Help - Search - Members - Calendar
Full Version: How to load data to "TimeTable" from External Sources ?
Modelica Forum > Modelica > Dymola
Pengfei
Hello smile.gif ,

I have a question using the "Modelica.Blocks.Sources.TimeTable". After double-click the "timeTable", I clicked the gray button to edit the table. I tired to load a file (either txt, mat, csv) from my local file folder. However, after click-and-enter, the data does not appear on Dymola at all. Could anyone advise me a correct way to load external data files to TimeTable in Dymola?

Thanks a lot!
smoss
Is your text file two columns of tab separated numbers?
i.e.
0 0
1 1
2 2
3 3
4 4

If so it should read straight in.



Or are you trying to read in a pre-existing table?
e.g.

#1
double table(5,2)
0 0
1 1
2 2
3 3
4 4

If so you need to click into the 'circle' to load it.
Pengfei
Hello Smoss,

Thank you very much for your help.

For example, if I want to load a txt file (table.txt)

table.txt:

0 0
1 1
2 2
3 3
4 4

I first open the table Click to view attachment and selected "load". Then Dymola prompt the "Dymola Select Matrix"Click to view attachment and I clicked OK. However, nothing is loaded in.

I think this is abnormal and I cannot find how to load table from the documentation.

smoss
Try choosing the csv/txt option? See arrow in the attached jpg.

(ps. I see what you mean, choosing the txt only option, instead of the csv/txt option, results in nothing being loaded)
Pengfei
Hello Smoss,

Thanks for you patient help! Attached screenshot shows how I failed this time Click to view attachment.

Looking forward to your reply.



smoss
I've attached two screen captures loading data into a TimeTable with csv/txt option in dymola 6.1.

Have you tried loading data in various formats:

(i) time-tab-data
(ii) time-space-data
(iii) time-comma-data

if so perhaps it's a 6.1 problem sad.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.