跳至主要內容

西门子仿真使用的坑

Entity大约 2 分钟

西门子仿真使用的坑

软件版本
TIA PortalV17
WinPcap4.1.3
S7-PLCSIM3.0
仿真CPU 1515-2 PN固件版本2.8

IP设置

  1. 打开控制面板,搜索设置PG/PC接口\,选中虚拟网卡,然后选择Siemens PLCSIM Virtual Ethernet Adapter.TCPIP.1 设置PG/PC接口
  2. 打开网络和共享中心,选择更改适配器设置,选中Siemens PLCSIM Virtual Ethernet Adapter.右键属性,选择Internet协议版本4(TCP/IPv4),点击属性,选择使用下面的IP地址,设置IP地址为xxx.xxx.xxx.xxxopen in new window(和网卡在一个网段才行),子网掩码为xxx.xxx.xxx.0,默认网关为空,DNS服务器为空 设置PG/PC接口设置PG/PC接口
  3. 勾选真实网卡,点击属性,选择Siemens PLCSIM Virtual Switch,点击确定 设置PG/PC接口

仿真CPU设置

  1. 打开PLCSIM
  2. TCP/IP communication,选择local或者网卡
  3. Instance Name输入一个名字
  4. IP Address输入xxx.xxx.xxx.xxxopen in new window(和网卡在一个网段才行)
  5. Subnet Mask输入xxx.xxx.xxx.0(和网卡一样才行)
  6. PLC Type 选择 cup 1500

启动后,第一个信号灯是黄色代表正常,如果第二个灯闪红色,说明ip没设置好

设置PG/PC接口
设置PG/PC接口

博图相关设置

  1. 设置项目属性,开启块编译时支持仿真开启块编译时支持仿真
  2. 添加CPU,选择CPU 1515-2 PN,建议查看固件版本,固件版本2.8 添加CPU
  3. 开启允许远程的PUT/GET访问 允许远程的PUT/GET访问
  4. 设置CUP的IP地址,和仿真CPU的IP地址一样 允许远程的PUT/GET访问
  5. 关闭DB块的优化设置,否则无法查看地址偏移量 允许远程的PUT/GET访问

1. 安装Advanced失败时解决

  1. Run CMD as Administrator

  2. copy and paste the following command.

cd "C:\Program Files\Common Files\Siemens\PLCSIMADV\Drivers" Siemens.Simatic.PlcSim.Advanced.DriverInstaller.exe install attachment #12272 3. Restart the computer after the installation is complete.

I resolved the issue using the above method, but installing it directly from the directory did not work properly.

If an error occurs when running the install command, check the relevant section again.

2. 解决方案2

I found a solution, not entirely fixed but a solution that works.

  1. Had to clear the computer cache:

PressWin + Rto open the Run dialog, then typetempand press Enter. Delete all the files in the "Temp" folder. PressWin + Ragain, type%temp%,and press Enter. Delete all the files in the "Temp" folder that opens. PressWin + R, typeprefetch, and press Enter. Delete all the files in the "Prefetch" folder. 2. Now you can install any version without error, sadly V5 and up would not start up even after installation without any errors

  1. Install V4 and it will work without any problems

This entire problem is something I and a collegue got from the windows 11 pro update 24h2 So if you have the same problem after installing that update you can try this solution.