test
This commit is contained in:
@@ -9,17 +9,16 @@
|
|||||||
// 硬度
|
// 硬度
|
||||||
public ushort HardnessMax { get; set; }
|
public ushort HardnessMax { get; set; }
|
||||||
public ushort HardnessStartCoil { get; set; }
|
public ushort HardnessStartCoil { get; set; }
|
||||||
|
|
||||||
public ushort HardnessCompleteCoil { get; set; }
|
|
||||||
public ushort HardnessStartReset { get; set; }
|
public ushort HardnessStartReset { get; set; }
|
||||||
public ushort HardnessStartStop { get; set; }
|
public ushort HardnessStartStop { get; set; }
|
||||||
|
|
||||||
public ushort HardnessSudu { get; set; }
|
public ushort HardnessSudu { get; set; }
|
||||||
public ushort HardnessWeiyi { get; set; }
|
public ushort HardnessWeiyi { get; set; }
|
||||||
public ushort HardnessPoSun { get; set; }
|
|
||||||
public ushort HardnessForward { get; set; }
|
public ushort HardnessForward { get; set; }
|
||||||
public ushort HardnessBack { get; set; }
|
public ushort HardnessBack { get; set; }
|
||||||
|
|
||||||
|
public ushort HardnessShishilizhi { get; set; }
|
||||||
// 脆碎度
|
// 脆碎度
|
||||||
public ushort FriabilityStartCoil { get; set; }
|
public ushort FriabilityStartCoil { get; set; }
|
||||||
public ushort WeightBefore { get; set; } // 天平重量寄存器(可选)
|
public ushort WeightBefore { get; set; } // 天平重量寄存器(可选)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace TabletTester2025.Models
|
|||||||
public double HardnessMax { get; set; }
|
public double HardnessMax { get; set; }
|
||||||
public double HardnessMin { get; set; }
|
public double HardnessMin { get; set; }
|
||||||
public int HardnessTestCount { get; set; }
|
public int HardnessTestCount { get; set; }
|
||||||
//public double HardnessMax { get; set; }
|
public double HardnessShishilizhi { get; set; }
|
||||||
|
|
||||||
// 脆碎度
|
// 脆碎度
|
||||||
public double FriabilityLoss { get; set; }
|
public double FriabilityLoss { get; set; }
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ namespace TabletTester2025.ViewModels
|
|||||||
[ObservableProperty] private double _hardnessWeiyi = 100; // 硬度位移输入mm
|
[ObservableProperty] private double _hardnessWeiyi = 100; // 硬度位移输入mm
|
||||||
//[ObservableProperty] private double _hardnessPoSun = 400; // 硬度破损判定输入N
|
//[ObservableProperty] private double _hardnessPoSun = 400; // 硬度破损判定输入N
|
||||||
[ObservableProperty] private double _hardnessMaxN = 72; //最大力采集
|
[ObservableProperty] private double _hardnessMaxN = 72; //最大力采集
|
||||||
|
//[ObservableProperty] private double HardnessShishilizhi = 72; //最大力采集
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -100,6 +101,7 @@ namespace TabletTester2025.ViewModels
|
|||||||
[ObservableProperty] private int _hardnessCurrentCount;
|
[ObservableProperty] private int _hardnessCurrentCount;
|
||||||
[ObservableProperty] private double _hardnessMax;
|
[ObservableProperty] private double _hardnessMax;
|
||||||
[ObservableProperty] private double _hardnessMin;
|
[ObservableProperty] private double _hardnessMin;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[ObservableProperty] private bool _disintegrationPass; // 新增
|
[ObservableProperty] private bool _disintegrationPass; // 新增
|
||||||
@@ -828,18 +830,9 @@ namespace TabletTester2025.ViewModels
|
|||||||
await _plc.WriteFloatAsync(_plcConfig.HardnessWeiyi, (float)currentWeiyi);
|
await _plc.WriteFloatAsync(_plcConfig.HardnessWeiyi, (float)currentWeiyi);
|
||||||
|
|
||||||
|
|
||||||
await _plc.WriteCoilAsync(_plcConfig.HardnessStartCoil, true);
|
await _plc.WriteCoilAsync(_plcConfig.HardnessStartCoil, true);//启动
|
||||||
|
|
||||||
bool completed = false;
|
|
||||||
while (!completed && Phase == TestPhase.Running)
|
|
||||||
{
|
|
||||||
await Task.Delay(200);
|
|
||||||
completed = await _plc.ReadCoilAsync(_plcConfig.HardnessCompleteCoil);
|
|
||||||
}
|
|
||||||
|
|
||||||
HardnessMax = await _plc.ReadFloatAsync(_plcConfig.HardnessMax);
|
|
||||||
|
|
||||||
Phase = TestPhase.Completed;
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -295,6 +295,13 @@
|
|||||||
<TextBlock Text="最大力值(N)" Style="{StaticResource MetricLabel}"/>
|
<TextBlock Text="最大力值(N)" Style="{StaticResource MetricLabel}"/>
|
||||||
<TextBlock Text="{Binding HardnessMax, StringFormat=F1}" Foreground="#1565C0" Style="{StaticResource MetricValue}"/>
|
<TextBlock Text="{Binding HardnessMax, StringFormat=F1}" Foreground="#1565C0" Style="{StaticResource MetricValue}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
<Border Style="{StaticResource MetricCard}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="实时力值(N)" Style="{StaticResource MetricLabel}"/>
|
||||||
|
<TextBlock Text="{Binding HardnessShishilizhi, StringFormat=F1}" Foreground="#1565C0" Style="{StaticResource MetricValue}"/>
|
||||||
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
"HardnessWeiyi": 310, // 硬度位移输入mm/min
|
"HardnessWeiyi": 310, // 硬度位移输入mm/min
|
||||||
"HardnessPoSun": 400, // 硬度破损判定输入N
|
"HardnessPoSun": 400, // 硬度破损判定输入N
|
||||||
"HardnessMax": 72, //最大力采集
|
"HardnessMax": 72, //最大力采集
|
||||||
|
"HardnessShishilizhi": 1314, //力显示
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
"FriabilityStartCoil3": 80, //脆碎工位1启动测试M70
|
"FriabilityStartCoil3": 80, //脆碎工位1启动测试M70
|
||||||
"FriabilityStartCoilStop": 83, // 脆碎停止
|
"FriabilityStartCoilStop": 83, // 脆碎停止
|
||||||
"FriabilityStartCoilReset": 95, // 脆碎复位启动
|
"FriabilityStartCoilReset": 95, // 脆碎复位启动
|
||||||
"HardnessCompleteCoil": 11,
|
|
||||||
|
|
||||||
"WeightBefore": 200,
|
"WeightBefore": 200,
|
||||||
"WeightAfter": 202,
|
"WeightAfter": 202,
|
||||||
|
|||||||
Reference in New Issue
Block a user