From 3fe7c967f7fda87552fd317fcd78b2fc120e190f Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Sat, 22 Oct 2022 18:02:01 +0800 Subject: [PATCH] PLC --- src/main/java/com/zzjee/plc/controller/WmsPlcController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/zzjee/plc/controller/WmsPlcController.java b/src/main/java/com/zzjee/plc/controller/WmsPlcController.java index bff414f5..7e750479 100644 --- a/src/main/java/com/zzjee/plc/controller/WmsPlcController.java +++ b/src/main/java/com/zzjee/plc/controller/WmsPlcController.java @@ -245,7 +245,7 @@ public class WmsPlcController extends BaseController { else if(split[0].equals("float")){ Float runfloat = Float.parseFloat(split[2]) * stepNumrun; System.out.println("runfloat:"+Math.abs(runfloat)); - siemensS7Net.Write(defaultAddress,runfloat); + siemensS7Net.Write(defaultAddress,Math.abs(runfloat)); } else if(split[0].equals("-float")){ Float runfloat = Float.parseFloat(split[2]) * stepNumrun;