This commit is contained in:
@@ -10,9 +10,9 @@ namespace HME_MoistureLossMeter.Services
|
|||||||
public class ModbusTcpPlcService : IPlcService, IDisposable
|
public class ModbusTcpPlcService : IPlcService, IDisposable
|
||||||
{
|
{
|
||||||
// 寄存器地址常量 - 测试界面
|
// 寄存器地址常量 - 测试界面
|
||||||
public const ushort ADDR_WATER_TEMP = 1118; // 水浴温度
|
public const ushort ADDR_WATER_TEMP = 3118; // 水浴温度
|
||||||
public const ushort ADDR_CHAMBER_TEMP = 1168; // 箱体温度
|
public const ushort ADDR_CHAMBER_TEMP = 3168; // 箱体温度
|
||||||
public const ushort ADDR_WEIGHT = 1268; // 重量
|
public const ushort ADDR_WEIGHT = 3268; // 重量
|
||||||
public const ushort ADDR_AIR_VOLUME = 4110; // 空气体积
|
public const ushort ADDR_AIR_VOLUME = 4110; // 空气体积
|
||||||
public const ushort ADDR_OUTLET_FLOW = 1218; // 出口流量
|
public const ushort ADDR_OUTLET_FLOW = 1218; // 出口流量
|
||||||
public const ushort ADDR_PRESET_HOUR = 1681; // 设定测试时
|
public const ushort ADDR_PRESET_HOUR = 1681; // 设定测试时
|
||||||
@@ -26,8 +26,8 @@ namespace HME_MoistureLossMeter.Services
|
|||||||
public const ushort ADDR_BATCH_NO = 3202; // 生产批号
|
public const ushort ADDR_BATCH_NO = 3202; // 生产批号
|
||||||
public const ushort ADDR_OPERATOR_ID = 3200; // 操作员编号
|
public const ushort ADDR_OPERATOR_ID = 3200; // 操作员编号
|
||||||
public const ushort ADDR_EXPERIMENT_ID = 3204; // 实验编号
|
public const ushort ADDR_EXPERIMENT_ID = 3204; // 实验编号
|
||||||
public const ushort ADDR_TIDAL_VOLUME = 300; // 潮气量
|
public const ushort ADDR_TIDAL_VOLUME = 2300; // 潮气量
|
||||||
public const ushort ADDR_FREQUENCY = 210; // 频率
|
public const ushort ADDR_FREQUENCY = 2210; // 频率
|
||||||
public const ushort ADDR_BREATH_COUNT = 3000; // 呼吸次数
|
public const ushort ADDR_BREATH_COUNT = 3000; // 呼吸次数
|
||||||
public const ushort ADDR_DRY_AIR_FLOW = 3700; // 通入干燥空气量
|
public const ushort ADDR_DRY_AIR_FLOW = 3700; // 通入干燥空气量
|
||||||
|
|
||||||
|
|||||||
@@ -240,11 +240,21 @@
|
|||||||
Command="{Binding PrintCommand}"
|
Command="{Binding PrintCommand}"
|
||||||
Width="80" Height="40"/>
|
Width="80" Height="40"/>
|
||||||
|
|
||||||
<Button Content="加热"
|
<Button Command="{Binding ToggleHeatCommand}"
|
||||||
Command="{Binding ToggleHeatCommand}"
|
|
||||||
Width="80" Height="40"
|
Width="80" Height="40"
|
||||||
Background="{Binding IsHeating, Converter={StaticResource BoolToVisibilityConverter},
|
Content="加热">
|
||||||
ConverterParameter=DangerBrush, FallbackValue={StaticResource AccentBrush}}"/>
|
<Button.Style>
|
||||||
|
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsHeating}" Value="True">
|
||||||
|
<Setter Property="Background" Value="{StaticResource DangerBrush}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Button.Style>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<Button Content="呼气"
|
<Button Content="呼气"
|
||||||
Command="{Binding ManualExhaleCommand}"
|
Command="{Binding ManualExhaleCommand}"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"PlcConfiguration": {
|
"PlcConfiguration": {
|
||||||
"IpAddress": "192.168.1.100",
|
"IpAddress": "192.168.1.150",
|
||||||
"Port": 502,
|
"Port": 502,
|
||||||
"SlaveId": 1,
|
"SlaveId": 1,
|
||||||
"PressureRegister": 1000,
|
"PressureRegister": 1000,
|
||||||
|
|||||||
Reference in New Issue
Block a user