From 97f4a29d047e9ddd6d0880b9e4037361c82e0664 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Sat, 22 Oct 2022 15:18:45 +0800 Subject: [PATCH] =?UTF-8?q?PLC=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zzjee/plc/controller/WmsPlcController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/zzjee/plc/controller/WmsPlcController.java b/src/main/java/com/zzjee/plc/controller/WmsPlcController.java index 0ea7b6a5..af90cc6e 100644 --- a/src/main/java/com/zzjee/plc/controller/WmsPlcController.java +++ b/src/main/java/com/zzjee/plc/controller/WmsPlcController.java @@ -246,6 +246,11 @@ public class WmsPlcController extends BaseController { Float runfloat = Float.parseFloat(split[2]) * stepNumrun; siemensS7Net.Write(defaultAddress,runfloat); } + else if(split[0].equals("int")){ + Float runfloat = Float.parseFloat(split[2]) * stepNumrun; + int runint = runfloat.intValue(); + siemensS7Net.Write(defaultAddress,runint); + } } //执行完指令等待时间 try{