This commit is contained in:
@@ -1135,6 +1135,7 @@
|
|||||||
uiLabel8.TabIndex = 3;
|
uiLabel8.TabIndex = 3;
|
||||||
uiLabel8.Text = "0.0";
|
uiLabel8.Text = "0.0";
|
||||||
uiLabel8.TextAlign = ContentAlignment.MiddleLeft;
|
uiLabel8.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
|
|
||||||
//
|
//
|
||||||
// uiLabel9
|
// uiLabel9
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -353,8 +353,8 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
// 添加延迟确保数据稳定
|
// 添加延迟确保数据稳定
|
||||||
//await Task.Delay(500);
|
//await Task.Delay(500);
|
||||||
//await Task.Delay(500);
|
//await Task.Delay(500);
|
||||||
// 加锁防止异步并发重复执行
|
//加锁防止异步并发重复执行
|
||||||
await _asyncLock.WaitAsync();
|
await _asyncLock.WaitAsync();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 二次校验,防止锁等待期间状态已变更
|
// 二次校验,防止锁等待期间状态已变更
|
||||||
@@ -1009,7 +1009,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
private void PenetrationForm_Load(object sender, EventArgs e)
|
private void PenetrationForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
string plcIp = "192.168.1.10";
|
string plcIp = "192.168.1.10";
|
||||||
//string plcIp = "127.0.0.1";
|
//string plcIp = "127.0.0.1";
|
||||||
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
bool initSuccess = Data.ModbusResourceManager.Instance.Init(plcIp, 502);
|
||||||
if (!initSuccess)
|
if (!initSuccess)
|
||||||
@@ -1030,7 +1030,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
|
|
||||||
//this.comkou.DataSource = SerialPort.GetPortNames();
|
//this.comkou.DataSource = SerialPort.GetPortNames();
|
||||||
this.comkou.Items.Clear();
|
this.comkou.Items.Clear();
|
||||||
this.comkou.Items.Add("COM2");
|
this.comkou.Items.Add("COM11");
|
||||||
this.comkou.SelectedIndex = 0;
|
this.comkou.SelectedIndex = 0;
|
||||||
|
|
||||||
_readtimer = InitTimer();
|
_readtimer = InitTimer();
|
||||||
@@ -1210,7 +1210,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
_waitingResponse = false;
|
_waitingResponse = false;
|
||||||
|
|
||||||
serialPort = new SerialPort();
|
serialPort = new SerialPort();
|
||||||
serialPort.PortName = this.comkou.Text;
|
serialPort.PortName = this.comkou.Text;
|
||||||
serialPort.BaudRate = 38400;
|
serialPort.BaudRate = 38400;
|
||||||
serialPort.DataBits = 8;
|
serialPort.DataBits = 8;
|
||||||
serialPort.Parity = Parity.None;
|
serialPort.Parity = Parity.None;
|
||||||
@@ -1674,5 +1674,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
|
|||||||
{
|
{
|
||||||
ma?.BtnClickFunctionForNew(Function.ButtonType.切换型, 101);//混氧开关
|
ma?.BtnClickFunctionForNew(Function.ButtonType.切换型, 101);//混氧开关
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user