This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
<TextBox IsEnabled="False" Grid.Row="2" Grid.Column="1" x:Name="txtProbeAlpha" Text="0.008"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0">探头半径 (mm):</Label>
|
||||
<TextBox IsEnabled="False" Grid.Row="3" Grid.Column="1" x:Name="txtProbeRadius" Text="17.45"/>
|
||||
<TextBox IsEnabled="False" Grid.Row="3" Grid.Column="1" x:Name="txtProbeRadius" Text="15"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0">探头环数:</Label>
|
||||
<TextBox IsEnabled="False" Grid.Row="4" Grid.Column="1" x:Name="txtProbeCoils" Text="27"/>
|
||||
|
||||
@@ -590,7 +590,7 @@ namespace ConductivityApp
|
||||
Thread.Sleep(1000); // 等待1秒
|
||||
|
||||
// 2. 重新初始化
|
||||
string comPort = "COM2"; // 或从配置读取
|
||||
string comPort = "COM6"; // 或从配置读取
|
||||
int baudRate = 9600;
|
||||
|
||||
_serialPort = new SerialPort(comPort, baudRate, Parity.None, 8, StopBits.One);
|
||||
@@ -840,7 +840,7 @@ namespace ConductivityApp
|
||||
if (_plc != null && _plc.IsConnected)
|
||||
{
|
||||
object pressureObj = _plc.Read(DataType.DataBlock, 1, 120, VarType.Real, 1);
|
||||
return Convert.ToDouble(pressureObj)*0.85;
|
||||
return Convert.ToDouble(pressureObj);
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
@@ -1983,7 +1983,7 @@ namespace ConductivityApp
|
||||
}
|
||||
case "不锈钢":
|
||||
{
|
||||
txtSampleCount.Text = "120";
|
||||
txtSampleCount.Text = "50";
|
||||
txtSampleInterval.Text = "0.1";
|
||||
txtyangpin0.Visibility = Visibility.Collapsed;
|
||||
txtyangpin.Visibility = Visibility.Collapsed;
|
||||
@@ -1994,6 +1994,8 @@ namespace ConductivityApp
|
||||
|
||||
case "自定义":
|
||||
{
|
||||
txtSampleCount.Text = "100";
|
||||
txtSampleInterval.Text = "0.5";
|
||||
txtyangpin0.Visibility = Visibility.Visible;
|
||||
txtyangpin.Visibility = Visibility.Visible;
|
||||
break;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user