LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Load task from the file

Solved!
Go to solution

Hi,

 

My problem is related to temp. control task from file. I have two heaters and LS336 temperature controller unit. I want a kind of temperature profile which should be loaded from the file. This will be very easy for me to control temperature and some other issues.

 

I added some 2 vi s. or one of them, arrray should be devided in to array. and the second one, I cannot read from the file correctly, why I couldn't get.

 

Thanks for helps and effords. Best.

Download All
0 Kudos
Message 1 of 12
(3,739 Views)

Hello,

 

I guess the "loading task from file.vi" should load the untitled.txt? I recognized it also loads some zeros at the beginning. I guess this is not intended and needs some bug fixing.

 

I have no funny idea of what your "loading text file.vi" is supposed to do and what type of file it should read in. Please add a file that is ought to be used with this VI and describe the problem in detail. Please also add a description what from the file is supposed to be read in and how you want to retrieve those data for use in following code.

One comment on the VI right away: After klicking the clan up diagram, it looks like subarray, subarray3 and subarray5 show the same data, whats that supposed to be good for? It feels a bit messy (:

 

If you just want to read and write arrays of numbers into labview from files and you do not care too much about readability, you might want to try out the Labview XML. Or maybe use VIs like "Write to Spreadsheet.vi" and "Read from Spreadsheet.vi" as they just read and write blocks of numbers wich you can slice as needed afterwards.

 

Regards, Questionmarker

0 Kudos
Message 2 of 12
(3,727 Views)

Thank yo uvery much for this comment. I have a vi which controls the temperature. There are two heaters. I need to control both heaters temperatures.

Heater 1=H1 and Heater 2=H2.

I want to set the temperatures of the heaters from the data file. Temperature values from the text file will be read by labview program and this program will apply the values from the file. This will make my job easy I guess.

 

So the file can be eather "*.txt or "*.dat". I can easyly write using notepad or excel.

 

For this reason each row and column shoul be seperated after it was read. I will send first value of the first line to H1 and the second value of the first line to H2 for once. When the "job need to be done by program" finishes, second line will be read with the same vay and values will be sent to H1 and H2.

 

I hope I could explain. If not please mention. Best.

0 Kudos
Message 3 of 12
(3,723 Views)

ok, I guess I know what you want to do, I still do not understand how your VI could achieve that, though.

If you have LV2011, I attached an example that writes a file with some temperatures and reads it from the file afterwards.

 

If not, here is a picture of the whole code, so you can rewrite it:

read write array from file.jpg

note, its not fancy or something, but functional already. You can make a better one for your application.

 

I hope this solves your problem. Good luck with your experiment.

0 Kudos
Message 4 of 12
(3,717 Views)

 I do not have 2011. but I will make this now and try is. thanks.

0 Kudos
Message 5 of 12
(3,715 Views)
0 Kudos
Message 6 of 12
(3,711 Views)

I made the same-I guess made the same but didn't work. results is always "0". ?? But actually this is what I want. You understand wey well and solved actually. Could you please send me your vi for Labview2010. I attached vi to be checked. Best.

0 Kudos
Message 7 of 12
(3,708 Views)

Hi,

 

I actually want to read complately from the file. I will write a data to a *.txt file and read from the file. But here, in your vi, I need to write data into the 2D array and this write to the txt file. This is not very useful because I have more than 100 lines. So what can we do for this.

0 Kudos
Message 8 of 12
(3,700 Views)
Solution
Accepted by becidea

Hello becidea,

 

Are you simply trying to display the text file data in an array, or are you trying to use this data to perform an action with it?

 

Regards,

 

Jeff L.

0 Kudos
Message 9 of 12
(3,658 Views)

Yep;

 

I am trying to use this data to perform an action with it. This data will be a set of data to control the temperature

0 Kudos
Message 10 of 12
(3,645 Views)