0

I created an OPC server in DYMOLA, now I have this in DYMOSIM to click and initialize

using a ".MAT" file of a dsin.txt

Now I created a GUI file in MATLAB, and take input for variables and created a mat file

>>save FLUID_INITIALISE area volume density

Now I want to initialize this using MATLAB

I can do this

>>write(Initialize,1) //To initialize a previous data

I know can do this using dymola , SIMULATION > CONTINUE > IMPORT

BUT I WANT TO INITIALIZE IT USING MATLAB

normal MAT FILE LOOKS LIKE THIS

Aclass=['Atrajectory';'1.1        ';'           ';'binTrans   '];
data_1=[0,3600;100,100;50,50;5,5;100,100;90,90;10,10;10,10;10,10;10,10;10,10];
data_2=[];
dataInfo=[0     1     1     1     1     1     1     1     1     1     1     2     2;
         1     2     3     4     5     6     7     8     9    10    11     2     3;
         0     0     0     0     0     0     0     0     0     0     0     0     0;
        -1     0     0     0     0     0     0     0     0     0     0    -1    -1;];          
description=['TFFTTTHAVDS  ';'ieeeeeeroep  ';'meemmmaelne  ';'eddppptausc  ';'        mii  ';'ichchht[etf  ';'nooooorm yi  ';' ltltta^[ c  ';'[d d  n2m[   ';'s i ios]^kH  ';']ininuf 3ge  ';' n/n te ]/a  ';' /o [ r  mt  ';' ou[K[   ^   ';' utK]Kc  3[  ';' t ] ]o  ]J  ';'  [   e   k  ';' [k   f   g  ';' kg   f   ^  ';' g/   i   -  ';' /h   c   1  ';' h]   i   K  ';' ]    e   -  ';'      n   1  ';'      t   ]  ';'             ';'      [      ';'      k      ';'      g      ';'      /      ';'      K      ';'      m      ';'      ^      ';'      2      ';'      s      ';'      ^      ';'      2      ';'      ]      '];
name=['TFFTTTUAVDCTd';'ichchh roepce';'miiiio eln or';'e      aus  (';'        mi  T';'        et  c';'         y  o';'            )'];
save INITIALIZER Aclass data_1 data_2 dataInfo description name;
Rohit gupta
  • 211
  • 3
  • 18

1 Answers1

1

To solve this issue what I did is,

I initialized dymola with default dsin.txt [which is created once you click simulate button]

then I write new values to them using this

write(area,20);
write(volume,30); 

.. etc

Now

write(Run,1)
Rohit gupta
  • 211
  • 3
  • 18