实际上,我需要在西门子PLCSim Advanced (一个虚拟网络模拟器)上创建一个实例,我需要使用:
using Siemens.Simatic.Simulation.Runtime;
void button1.click()
{
IInstance myInstance = SimulationRuntimeManager.RegisterInstance("nameOfYourInstance");
myInstance.PowerOn();
}但我不知道我需要添加什么名字。如果你知道我需要你的帮助。
发布于 2022-07-07 12:50:03
您需要添加对Siemens.Simatic.Simulation.Runtime.Api.x64.dll.的引用它包括运行模拟所需的名称空间和类。
西门子在这里提供了PDF文件中的文档:SIMATIC S7-PLCSIM高级。本文档第2.2节帮助Visual集成。如果URL过时了,下面是与这个问题相关的部分。

https://stackoverflow.com/questions/72897954
复制相似问题