VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

confused simulation result with .Net API

Solved!
Go to solution

Premise: All of my simulation targets are Windows(localhost).

 

I use VeriStand .Net API as follow:

    1. create SystemDefinition File(generate .nivssdf file with model1);

    2. new Factory();

    3. GetIWorkSpace2();

    4. ConnectToSystem(sdfpath, true, 600000);

    5. GetSingleChannelValue(varname, out val);

and I can get values correctly. but i want to change the model to model2, so i edit the sdf file with RemoveNode() and AddModel(newmodel) after call "DisconnectFromSystem("",true)". And i get a new .nivssdf with model2. Then i start from the third step. No error is displayed, but the value i get from GetSingleChannelValue(varname, out val) is the value of model1.

 

After i import my new .nivssdf(with modle2) in VeriStand, I can get values correctly.I think i do not clear something which is used again when i deploy my new sdf file. Help!!!

0 Kudos
Message 1 of 3
(5,512 Views)

I found that i must change the target name to get correct result when i change the model.dll. Why???

0 Kudos
Message 2 of 3
(5,482 Views)
Solution
Accepted by topic author NicoYang
I solved the problem by deleting the "/Appdata/Temp/nivs/" folder.
0 Kudos
Message 3 of 3
(5,436 Views)