LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

READ TXT FILE IN STEPS

Solved!
Go to solution

Dear Friend Alain S,

 

I updated the xls file.

 

Graph 1: variables tempf  100010000  100020000  100030000  100040000 100050000 100060000 120010000 120020000 120030000 120040000    120050000 120060000 120070000 120080000  120090000 120100000 120110000 140010000

 

Graph 2: variables

tempf 140020000 220010000 220020000  230010000  260010000  160010000  160020000 160030000 160040000 160050000 160060000  170010000  175010000 180010000  180020000  180030000  180040000 180050000  180060000  180070000  185010000  190010000  210010000  500010000 

 

Is it possible to present these variables in steps of 100 s (on two graphs - time (x axis) and variables (y axis))?

 

Thanks for the valuable help! Smiley Happy



0 Kudos
Message 11 of 18
(961 Views)

I think this RELAP file format is a bit crappy 😛

 

My solution won't work for this since I assumed that columns = data but it looks like additional stitching which I didn't account for is necessary.

 

My solution will grab the first 9 columns.  Additional logic can be applied to know if more columns should be added to the existing graph or whether the next block is a continuation of the time series.  Think about how to do the logic and then try to do an append of the new columns.

 

Spend some time thinking about it and post what you end up with.

Message 12 of 18
(952 Views)
Solution
Accepted by topic author Prof._Arne_Saknussemm

@Prof. Arne Saknussemm wrote:

Dear Friend Alain S,

 

I updated the xls file.

 

Graph 1: variables tempf  100010000  100020000  100030000  100040000 100050000 100060000 120010000 120020000 120030000 120040000    120050000 120060000 120070000 120080000  120090000 120100000 120110000 140010000

 

Graph 2: variables

tempf 140020000 220010000 220020000  230010000  260010000  160010000  160020000 160030000 160040000 160050000 160060000  170010000  175010000 180010000  180020000  180030000  180040000 180050000  180060000  180070000  185010000  190010000  210010000  500010000


Thanks for the update! Now it's clear for all of us.

The first graph contains the first 2 blocks of each group, that is 18 variables

The second graph contains the last 3 blocks of each group, that is 24 variables

 


@Prof. Arne Saknussemm wrote:

Is it possible to present these variables in steps of 100 s (on two graphs - time (x axis) and variables (y axis))?


Of course it is!

I think LabView can do everything except (maybe) baking pan cakes Smiley Very Happy Smiley Very Happy Smiley Very Happy

 

Spoiler

Maybe a challange to all real specialists around here!

 

 

Use an XY graph, extract the pages from the 3D array and bring it all together!

I'll give you a start in the attached vi. This is NOT a good way to do it Smiley Sad

Up to you to upgrade the code and make the second graph.


So please wire something an come back to us with your code!

Preferably in LV 8.6 version if you want me to have a look at it... ...

Message 13 of 18
(932 Views)

Dear Friend Alain S,


I will study with care! Smiley Happy

thanks

0 Kudos
Message 14 of 18
(922 Views)

Dear Friend Alain S,

 

See the attached VI (Read TXT file) developed in LabVIEW 8.6. I sent you the txt file again.

 

This reads the variables (tempf) from the lines 5187, 5241 and 5295 (see explanation in the attached VI block diagram).

 

Do you have any suggestions for presenting the results in just 1 graph instead of 3 graphics? Smiley Sad

 

Thanks! Smiley Happy

 

 

Download All
0 Kudos
Message 15 of 18
(909 Views)

Something like this maybe?

Select the pages you want to show in 1 graph and let the wires do the job.

Download All
Message 16 of 18
(899 Views)

Dear Friend Alain S,

 

Thanks for everything !!! Smiley Very Happy

 

0 Kudos
Message 17 of 18
(894 Views)

hi, I have almost the same problem. I want to control the temperature. Like this; I want to set the temperatures to the value that read from the file. I will prepare a txt file like;

T1       T2

300K   300K

3005K 300K

300K  300K

400K  400K

405K  400K

400K  400K

...

1000K

900K 900K

905K 900K

900K 900K

800K 800K

 

...

300K 300K

 

I want to make like this given above. each value will be contact to the LS336 temperature controller. Thanks for efford. Best.

 

For (i=300; i<UST_LIMIT; i = i + 100)
{
  SetTemp (H1, i);
  SetTemp (H2, i);
  WaitForTempStabilize ();
  Res = MeasureResistance ();

  SetTemp (H1, i+5);
  WaitForTempStabilize ();
  SetTemp (H1, i);
  SetTemp (H2, i);
  RecordData ();
}
0 Kudos
Message 18 of 18
(854 Views)