I try to do these actions on my PC and the results are like yours. I can save and change the .ms file only after the simulation stopped. Moreover I try to modify the mathscriptwpause.ms during the simulation (meanwhile pause box is waiting the input) with UltraEdit: I can save the file, the editor can not save the backup copy, but the simulation stopped with error after I push the pause button. I'm not able to save the file If I use CrimsonEditor meanwhile the pause button is waiting.
But in my tests all the commands in the macro are done. I have no pause in the .ms file.
Maybe the problem arises from the use of some commands: in the beginning of my .ms files I use 'undefine simexe' and then 'oscmd("del simucb.dll")'. This is done because if I don't dele
te the dll, the program will use the last .dll created and doesn't remake it.
Inside the .ms file there is a call to another file that I have to execute: 'execute file = "Gain_AP.ms"'. This files assigns some values to constants and % variables. I must tell you that I can change this file and save it also after the simulation of the principal file.
I also use these commands:
- getChoice
- set directory (the behaviour is different if I use the Xmath program in NT or in Win2000 O.S. environment)
- stringex
- index
- load file (-> data file saved from another mathscript)
- system
- abcd
- makepoly
- sys2sns
Also I load a block schema with a model and a control system. This schema contains UCB components those link C and Fortran source codes.
Then I execute the 'sim(...)' command, and save the results in some variables:
p1 = plot(t,out(:,1),{....}); etc.
Maybe the sim command lock the .ms file. I don't know.
The behavior is the same in all the macro that contai
ns 'sim(...)' command. Also if I put this command in an other .ms files, that is call by the principal .ms file.
Thanks,
Francesco