Commit 96fe4de3 authored by 潘栩锋's avatar 潘栩锋 🚴

旋转通过 PLC 获取, 整理PLC寄存器资料。 收卷 V1,V2 都是与下吹逻辑不一样。 把转向开关信号反转了

parent 15763f29
......@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.8")]
[assembly: AssemblyFileVersion("7.0.8")]
[assembly: AssemblyVersion("7.0.9")]
[assembly: AssemblyFileVersion("7.0.9")]
[assembly: Guid("A4B71A37-7B77-47AA-9F59-ACC3EF84C4E0")]
......@@ -176,14 +176,10 @@ namespace FLY.DownBlowing.Server
Misc.BindingOperations.SetBinding(winderAccessory, nameof(winderAccessory.RotaryFreqSet), () =>
{
RotaryFreqSet = winderAccessory.RotaryFreqSet;
updateMinuteOfR();
});
Misc.BindingOperations.SetBinding(winderAccessory, nameof(winderAccessory.RotaryFreq), () =>
{
updateRSpeed();
});
updateMinuteOfR();
updateRSpeed();
this.PropertyChanged += RotarySystem_PropertyChanged;
dispatcherTimer = new DispatcherTimer();
......@@ -210,15 +206,21 @@ namespace FLY.DownBlowing.Server
}
void updateRSpeed()
{
if (!IsRotaryOn)
{
RSpeed = 0;
return;
}
if (IsForw)
{
isCurrentForw = true;
RSpeed = winderAccessory.RotaryFreq;
RSpeed = RotaryFreqSet;
}
else if (IsBackw)
{
isCurrentForw = false;
RSpeed = -winderAccessory.RotaryFreq;
RSpeed = -RotaryFreqSet;
}
else
{
......@@ -488,6 +490,18 @@ namespace FLY.DownBlowing.Server
{
updateRSpeed();
}
else if (e.PropertyName == nameof(RPosOfR))
{
updateMinuteOfR();
}
else if (e.PropertyName == nameof(RotaryFreqSet))
{
updateMinuteOfR();
updateRSpeed();
}
else if (e.PropertyName == nameof(IsRotaryOn)) {
updateRSpeed();
}
}
string filePath = "rotary.json";
......
......@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.7")]
[assembly: AssemblyFileVersion("7.0.7")]
[assembly: AssemblyVersion("7.0.9")]
[assembly: AssemblyFileVersion("7.0.9")]
[assembly: Guid("72FBA808-FA10-43BF-8504-C6E814E031E7")]
......@@ -488,6 +488,17 @@ namespace FLY.Thick.Blowing.Server
FObjServiceClientManager.Instance.ConnAddrs.Add(new ConnAddr() { ConnName = connName, Addr = PlcAddr });
rotarySerivce = new RotarySerivceClient(FLY.Thick.Blowing.RotaryMachine.OBJ_INTERFACE.OBJ_INTERFACE_ID.RotarySerivce_OBJ_ID, connName);
Misc.BindingOperations.SetBinding(rotarySerivce, nameof(rotarySerivce.IsForw), () =>
{
if(rotarySerivce.IsForw)
Direction = DIRECTION.FORWARD;
});
Misc.BindingOperations.SetBinding(rotarySerivce, nameof(rotarySerivce.IsBackw), () =>
{
if (rotarySerivce.IsBackw)
Direction = DIRECTION.BACKWARD;
});
Misc.BindingOperations.SetBinding(rotarySerivce, nameof(rotarySerivce.RPosGlobal), () =>
{
GlobalRPos = (int)(rotarySerivce.RPosGlobal);
......@@ -495,32 +506,43 @@ namespace FLY.Thick.Blowing.Server
Misc.BindingOperations.SetBinding(rotarySerivce, nameof(rotarySerivce.RSpeed), () =>
{
RSpeed = (int)(rotarySerivce.RSpeed);
updateRenZiJiaPeriodFromRPos();
});
Misc.BindingOperations.SetBinding(rotarySerivce, nameof(rotarySerivce.RPosOfR), () =>
{
RPosOfR = (int)(rotarySerivce.RPosOfR);
if (double.IsNaN(rotarySerivce.RPosAtTurnSign0))
{
//刚开机随便一个值
OrgRPos = -RPosOfR / 2;
}
updateRenZiJiaPeriodFromRPos();
//if (double.IsNaN(rotarySerivce.RPosAtTurnSign0))
//{
// //刚开机随便一个值
// OrgRPos = -RPosOfR / 2;
//}
});
Misc.BindingOperations.SetBinding(rotarySerivce, nameof(rotarySerivce.RPosAtTurnSign0), () =>
{
if (!double.IsNaN(rotarySerivce.RPosAtTurnSign0))
OrgRPos = (int)(rotarySerivce.RPosAtTurnSign0);
else
{
//刚开机随便一个值
OrgRPos = -RPosOfR / 2;
}
//else
//{
// //刚开机随便一个值
// OrgRPos = -RPosOfR / 2;
//}
});
rotarySerivce.PropertyChanged += RotarySerivce_PropertyChanged;
}
void updateRenZiJiaPeriodFromRPos()
{
if (Math.Abs(RSpeed) > 0)
{
int sec = RPosOfR / Math.Abs(RSpeed);
if (sec > 60 * 2 && sec < 60 * 30)
{
RenZiJiaPeriod = TimeSpan.FromSeconds(sec);
}
}
}
private void RotarySerivce_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(IRotarySerivce.IsTurnSign0))
......
......@@ -51,7 +51,7 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.7.0")]
[assembly: AssemblyFileVersion("7.0.7.0")]
[assembly: AssemblyVersion("7.0.9.0")]
[assembly: AssemblyFileVersion("7.0.9.0")]
[assembly: Guid("A2277244-BCD4-485B-85F4-AAE96DA235B5")]
......@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.7.0")]
[assembly: AssemblyFileVersion("7.0.7.0")]
[assembly: AssemblyVersion("7.0.8.0")]
[assembly: AssemblyFileVersion("7.0.8.0")]
[assembly: Guid("0CE35EA7-927A-41C0-9DC6-80511329760B")]
......@@ -174,14 +174,10 @@ namespace FLY.Winder.Server
Misc.BindingOperations.SetBinding(winderAccessory, nameof(winderAccessory.RotaryFreqSet), () =>
{
RotaryFreqSet = winderAccessory.RotaryFreqSet;
updateMinuteOfR();
});
Misc.BindingOperations.SetBinding(winderAccessory, nameof(winderAccessory.RotaryFreq), () =>
{
updateRSpeed();
});
updateMinuteOfR();
updateRSpeed();
this.PropertyChanged += RotarySystem_PropertyChanged;
dispatcherTimer = new DispatcherTimer();
......@@ -208,15 +204,21 @@ namespace FLY.Winder.Server
}
void updateRSpeed()
{
if (!IsRotaryOn)
{
RSpeed = 0;
return;
}
if (IsForw)
{
isCurrentForw = true;
RSpeed = winderAccessory.RotaryFreq;
RSpeed = RotaryFreqSet;
}
else if (IsBackw)
{
isCurrentForw = false;
RSpeed = -winderAccessory.RotaryFreq;
RSpeed = -RotaryFreqSet;
}
else
{
......@@ -486,6 +488,19 @@ namespace FLY.Winder.Server
{
updateRSpeed();
}
else if (e.PropertyName == nameof(RPosOfR))
{
updateMinuteOfR();
}
else if (e.PropertyName == nameof(RotaryFreqSet))
{
updateMinuteOfR();
updateRSpeed();
}
else if (e.PropertyName == nameof(IsRotaryOn))
{
updateRSpeed();
}
}
string filePath = "rotary.json";
......
......@@ -21,11 +21,10 @@
//----------------------------------------------------------------
//2022/05/31
设备连接变量表_v2.1_中心收卷_旋转正反转向交换
与v1对比
与v2对比
正反转向信号交换
与HMI实际会不相同
//----------------------------------------------------------------
//2020/06/22
设备连接变量表_v3.0_全部合体-20200622
......
#!/bin/bash
cp WinderAccessory.cs ../../../../Project.FLY.Winder_20190413/FLY.Winder/Common
cp WinderInsideOutside.cs ../../../../Project.FLY.Winder_20190413/FLY.Winder/Common
cp WS.xml ../../../../Project.FLY.Winder_20190413/FLY.Winder.UI.Server/bin/Debug/Gage1
......@@ -2290,22 +2290,22 @@
{
"DeviceIndex": 0,
"Mode": "0",
"Addr": 64549,
"Addr": 64520,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryForw",
"RegAddr": "汇川H3U 监控协议.Y(45)"
"RegAddr": "汇川H3U 监控协议.Y(10)"
},
{
"DeviceIndex": 0,
"Mode": "0",
"Addr": 64520,
"Addr": 64549,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryBackw",
"RegAddr": "汇川H3U 监控协议.Y(10)"
"RegAddr": "汇川H3U 监控协议.Y(45)"
},
{
"DeviceIndex": 0,
......@@ -2320,12 +2320,12 @@
{
"DeviceIndex": 0,
"Mode": "1",
"Addr": 63512,
"Addr": 63513,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryForwTurn",
"RegAddr": "汇川H3U 监控协议.X(30)"
"RegAddr": "汇川H3U 监控协议.X(31)"
},
{
"DeviceIndex": 0,
......@@ -2340,12 +2340,12 @@
{
"DeviceIndex": 0,
"Mode": "1",
"Addr": 63513,
"Addr": 63512,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryBackwTurn",
"RegAddr": "汇川H3U 监控协议.X(31)"
"RegAddr": "汇川H3U 监控协议.X(30)"
},
{
"DeviceIndex": 0,
......
......@@ -34,9 +34,9 @@ namespace PlcGroupInstall
keyValues.Clear();
keyValues.Add("IBC", "../脚本/release_conf/FLY.IBC.UI.Server/bin/Debug/Gage1");
keyValues.Add("IBC", "../脚本/release_conf/FLY.IBC.UI.Server/Gage1");
keyValues.Add("称重", "../脚本/release_conf/FLY.Weight.UI.Server/bin/Debug/Gage1");
keyValues.Add("称重", "../脚本/release_conf/FLY.Weight.UI.Server/Gage1");
keyValues.Add("称重单组分", "../脚本/release_conf/FLY.Weight2.UI.Server/Gage1");
......
Subproject commit a20a0d42a00782e17c822af011c952cbee32032f
Subproject commit 2801cd820617cf33995ede1e5ff94fbb042ee460
{
"InstallZipVersion":"7.0.8",
"InstallZipUrl":"http://server.flyautomation.net:8889/download/和美安装包_v7.0.8_20220525.7z"
"InstallZipVersion":"7.0.9",
"InstallZipUrl":"http://server.flyautomation.net:8889/download/和美安装包_v7.0.9_20220601.7z"
}
\ No newline at end of file
......@@ -2290,22 +2290,22 @@
{
"DeviceIndex": 0,
"Mode": "0",
"Addr": 64549,
"Addr": 64520,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryForw",
"RegAddr": "汇川H3U 监控协议.Y(45)"
"RegAddr": "汇川H3U 监控协议.Y(10)"
},
{
"DeviceIndex": 0,
"Mode": "0",
"Addr": 64520,
"Addr": 64549,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryBackw",
"RegAddr": "汇川H3U 监控协议.Y(10)"
"RegAddr": "汇川H3U 监控协议.Y(45)"
},
{
"DeviceIndex": 0,
......@@ -2320,12 +2320,12 @@
{
"DeviceIndex": 0,
"Mode": "1",
"Addr": 63512,
"Addr": 63513,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryForwTurn",
"RegAddr": "汇川H3U 监控协议.X(30)"
"RegAddr": "汇川H3U 监控协议.X(31)"
},
{
"DeviceIndex": 0,
......@@ -2340,12 +2340,12 @@
{
"DeviceIndex": 0,
"Mode": "1",
"Addr": 63513,
"Addr": 63512,
"Type": "bool",
"Scale": 1.0,
"OwnerName": "Accessory",
"PropertyName": "IsRotaryBackwTurn",
"RegAddr": "汇川H3U 监控协议.X(31)"
"RegAddr": "汇川H3U 监控协议.X(30)"
},
{
"DeviceIndex": 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment