dep_yangw
yangw 10 months ago
parent 9daae8c89d
commit 715a3606b9

@ -638,9 +638,6 @@ namespace ProductionSystem.Forms
middleIsCanRound = false; middleIsCanRound = false;
Thread.Sleep(Program.ReadPlcRate); Thread.Sleep(Program.ReadPlcRate);
//自动模式 如果是手动模式就是false //自动模式 如果是手动模式就是false
if (D1004) if (D1004)
{ {
@ -928,7 +925,7 @@ namespace ProductionSystem.Forms
//启动水泵3 //启动水泵3
PWMHelper.Open(); PWMHelper.Open();
TmTool.WritePlc(TmTool.ShuiBeng3, 1);
} }

@ -103,14 +103,14 @@ namespace ProductionSystem.Untils.Tool
public string GetMsg(int num) public string GetMsg(int num)
{ {
uint seep = uint.Parse((mo * 0.4).ToString()); uint seep = uint.Parse((num * 0.4).ToString());
Write = seep.ToString(); Write = seep.ToString();
XTrace.WriteLine($"水泵Ux 第[{mo}-{com}]个 写入真实速度:{seep}"); XTrace.WriteLine($"水泵Ux 第[{mo}-{com}]个 写入真实速度:{seep}");
MFMsgVariable me = new MFMsgVariable(8); MFMsgVariable me = new MFMsgVariable(8);
me.AddMotoralaLsb(0, 8, seep); me.AddMotoralaLsb(0, 8, seep);
return me.GetByteDat().ToHex(); return me.GetByteDat().ToHex(" ");
} }
private TimerX _timer; private TimerX _timer;

@ -1,4 +1,5 @@
using System; using System;
using System.Globalization;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using NewLife; using NewLife;
@ -40,7 +41,7 @@ namespace ProductionSystem.Untils.Tool
public bool ToAction() public bool ToAction()
{ {
uint seep = uint.Parse((mo * 0.4).ToString()); uint seep = uint.Parse((mo * 0.4).ToString(CultureInfo.InvariantCulture));
Write = seep.ToString(); Write = seep.ToString();
XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 写入真实速度:{seep}"); XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 写入真实速度:{seep}");
@ -112,7 +113,6 @@ namespace ProductionSystem.Untils.Tool
var sendMes = GetMsg(mo); var sendMes = GetMsg(mo);
_timer= new TimerX(DoBackup, sendMes, 100, 800) { Async = true }; _timer= new TimerX(DoBackup, sendMes, 100, 800) { Async = true };
} }
private void DoBackup(Object state) private void DoBackup(Object state)

Loading…
Cancel
Save