DYMOLA:OPC服务器如何使用dsin.txt或使用MATLAB的mat文件进行初始化 [英] DYMOLA: opc server how to initialize using dsin.txt or a mat file using MATLAB

查看:81
本文介绍了DYMOLA:OPC服务器如何使用dsin.txt或使用MATLAB的mat文件进行初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在DYMOLA中创建了一个OPC服务器,现在我在DYMOSIM中有这个要单击并初始化

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

使用".MAT"dsin.txt的文件

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

现在,我在MATLAB中创建了一个GUI文件,并输入了变量并创建了一个Mat文件

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

>>save FLUID_INITIALISE area volume density

现在我想使用MATLAB初始化它

Now I want to initialize this using MATLAB

我可以做到

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

我知道可以使用dymola来做到这一点,模拟>继续>导入

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

但我想使用MATLAB对其进行初始化

BUT I WANT TO INITIALIZE IT USING MATLAB

像这样的普通MAT文件外观

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;

推荐答案

要解决此问题,我要做的是

To solve this issue what I did is,

我使用默认的 dsin.txt (一旦单击模拟"按钮即会创建)初始化了dymola.

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); 

..等等

现在

write(Run,1)

这篇关于DYMOLA:OPC服务器如何使用dsin.txt或使用MATLAB的mat文件进行初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆