I am using a Dymola OPC server
DYMOLA HAS these many tags which can be controlled using SimControl.Run, SimControl.Stop ,etc
here i wrote it in MATLAB
Writing this helped me to solve this issue
grp2=addgroup(da,'Demo2');
Run=additem(grp2,{'SimControl.Run'});
Status=additem(grp2,{'SimControl.Status'});
Stop=additem(grp2,{'SimControl.Stop'});
Pause=additem(grp2,{'SimControl.Pause'});
RunStatusBefore=read(Run,'device');
StatusBefore=read(Status,'device').Value;
StopStatusBefore=read(Stop,'device');
PauseStatusBefore=read(Pause,'device');
write(Initialize,1); //INITITALIZE
write(Run,1); // RUN
write(Stop,1); // STOP
write(Pause,1); // PAUSE