2 Incheckningar

Upphovsman SHA1 Meddelande Datum
  yahaha 07d7c9e40a Merge branch 'master' of http://111.9.47.105:10244/bpa/BPASmartClient 2 år sedan
  yahaha 81f7097f52 菜品库更新 2 år sedan
6 ändrade filer med 724 tillägg och 205 borttagningar
Delad Vy
  1. +3
    -1
      BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs
  2. +587
    -199
      BPASmartClient.MorkF/Control_MorkF.cs
  3. +2
    -0
      BPASmartClient.MorkF/GVL_MorkF.cs
  4. +127
    -0
      BPASmartClient.MorkF/ML_MorkF.cs
  5. +3
    -3
      BPASmartClient.MorkF/View/DebugView.xaml
  6. +2
    -2
      BPASmartClient.MorkF/ViewModel/DebugViewModel.cs

+ 3
- 1
BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs Visa fil

@@ -16,6 +16,8 @@ namespace BPASmartClient.PLC
{
Task.Run(new Action(() => { modbusTcp.ModbusTcpConnect(communicationPar.IPAddress, communicationPar.IPPort); })); //PLC 设备连接

Thread.Sleep(1000);

ThreadManage.GetInstance().StartLong(new Action(() =>
{
IsConnected = modbusTcp.Connected;
@@ -41,7 +43,7 @@ namespace BPASmartClient.PLC
Thread.Sleep(500);
}
Thread.Sleep(1000);
}), $"设备[{DeviceId}]PLC读取线程", true);
}), $"设备[{DeviceId}][{modbusTcp.IPAdress}]PLC读取线程", true);

//写入数据
EventBus.EventBus.GetInstance().Subscribe<WriteModel>(DeviceId, delegate (IEvent @event, EventCallBackHandle callBack)


+ 587
- 199
BPASmartClient.MorkF/Control_MorkF.cs
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 2
- 0
BPASmartClient.MorkF/GVL_MorkF.cs Visa fil

@@ -1,4 +1,5 @@
using BPA.Models;
using BPASmartClient.Device;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -25,6 +26,7 @@ namespace BPASmartClient.MorkF
/// <summary>
/// 炒锅自动模式
/// </summary>
[VariableMonitor("炒锅1锅低温度", "VW120", "160")]
public bool AutoMode { get; set; }
/// <summary>
/// 炒锅1初始化完成


+ 127
- 0
BPASmartClient.MorkF/ML_MorkF.cs Visa fil

@@ -0,0 +1,127 @@
using BPA.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkF
{
internal class ML_MorkF
{
#region 菜品库的操作状态
/// <summary>
/// 激光距离
/// </summary>
public int LaserDistance { get; set; }

/// <summary>
/// 菜品库当前X轴坐标
/// </summary>
public int ArmPositionX { get; set; }

/// <summary>
/// 菜品库当前Y轴坐标
/// </summary>
public int ArmPositionY { get; set; }

/// <summary>
/// 菜品库是否在工作中
/// </summary>
public bool MaterailIsWorking { get; set; }

/// <summary>
/// 初始化是否完成
/// </summary>
public bool InitialComplete { get; set; }

private bool _ArriveComplete = false;
/// <summary>
/// 定位到达,上升沿捕获需要特殊处理
/// </summary>
public bool ArriveComplete
{
get
{
var ret = _ArriveComplete;
_ArriveComplete = false;
if(ret)
{
MessageLog.GetInstance.Show("到达上升沿为true");
}
else
{
MessageLog.GetInstance.Show("到达上升沿为false");
}
return ret;
}
set
{
_ArriveComplete = value;
}
}

/// <summary>
/// 爪子初始化完成
/// </summary>
public bool PawInitialComplete { get; set; }

private bool _PawArrivePortOne = false;
/// <summary>
/// 爪子到达一号位,上升沿捕获需要特殊处理
/// </summary>
public bool PawArrivePortOne
{
get
{
var ret = _PawArrivePortOne;
_PawArrivePortOne = false;
return ret;
}
set
{
_PawArrivePortOne = value;
}
}

private bool _PawArrivePortTwo = false;
/// <summary>
/// 爪子到达二号位,上升沿捕获需要特殊处理
/// </summary>
public bool PawArrivePortTwo
{
get
{
var ret = _PawArrivePortTwo;
_PawArrivePortTwo = false;
return ret;
}
set
{
_PawArrivePortTwo = value;
}
}

private bool _PawArrivePortThree = false;
/// <summary>
/// 爪子到达三号位
/// </summary>
public bool PawArrivePortThree
{
get
{
var ret = _PawArrivePortThree;
_PawArrivePortThree = false;
return ret;
}
set
{
_PawArrivePortThree = value;
}
}
#endregion

#region
#endregion
}
}

+ 3
- 3
BPASmartClient.MorkF/View/DebugView.xaml Visa fil

@@ -97,9 +97,9 @@
<WrapPanel Grid.Row="2" Orientation="Horizontal" >
<Button Content="夹爪正转" Command="{Binding PawTurnFront}" Margin="5,0" Cursor="Hand"/>
<Button Content="夹爪反转" Command="{Binding PawTurnBack}" Margin="5,0" Cursor="Hand"/>
<RadioButton Content="位置2" Margin="5,0" IsEnabled="False" IsChecked="{Binding PawPositon1}" GroupName="a"/>
<RadioButton Content="位置1" Margin="5,0" IsEnabled="False" IsChecked="{Binding PawPositon2}" GroupName="b"/>
<RadioButton Content="位置3" Margin="5,0 " IsEnabled="False" IsChecked="{Binding PawPositon3}" GroupName="c"/>
<RadioButton Content="位置1" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon1}" Command="{Binding GetDistance_1}" GroupName="PawTurn"/>
<RadioButton Content="位置2" Margin="5,0" IsEnabled="True" IsChecked="{Binding PawPositon2}" Command="{Binding GetDistance_2}" GroupName="PawTurn"/>
<RadioButton Content="位置3" Margin="5,0 " IsEnabled="True" IsChecked="{Binding PawPositon3}" Command="{Binding GetDistance_3}" GroupName="PawTurn"/>
</WrapPanel>
</Grid>



+ 2
- 2
BPASmartClient.MorkF/ViewModel/DebugViewModel.cs Visa fil

@@ -183,8 +183,8 @@ namespace BPASmartClient.MorkF.ViewModel
#region 菜品控制

FoodLibInit = new RelayCommand(() => { ActionManage.GetInstance.Send("FoodLibInit"); });//菜品库初始化
StartElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List<bool> { true }); });//电磁阀启动
StopElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List<bool> { false });});//电磁阀关闭
StartElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List<bool> { false }); });//电磁阀启动
StopElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List<bool> { true });});//电磁阀关闭
SetSpeed = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("SetSpeed", new List<int> { MoveSpeed });


Laddar…
Avbryt
Spara