Commit e44f9bce authored by 潘栩锋's avatar 潘栩锋 🚴

添加 自动模头!!!!!

parent a66d8cb2
......@@ -47,6 +47,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Thick.FilmCasting.UI.Db
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{BC3B8548-3586-4FD1-ADDE-3E524825848D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AutoDie", "AutoDie", "{7CC06908-ED93-4B0A-81B8-55E11E04930A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.FilmCasting.AutoDie", "Project.FLY.FilmCasting.AutoDie\FLY.FilmCasting.AutoDie\FLY.FilmCasting.AutoDie.csproj", "{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.FilmCasting.AutoDie.UI.Server", "Project.FLY.FilmCasting.AutoDie\FLY.FilmCasting.AutoDie.UI.Server\FLY.FilmCasting.AutoDie.UI.Server.csproj", "{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.FilmCasting.AutoDie.UI.Client", "Project.FLY.FilmCasting.AutoDie\FLY.FilmCasting.AutoDie.UI.Client\FLY.FilmCasting.AutoDie.UI.Client.csproj", "{51DE4702-EABC-4984-91AA-61B7D17F7742}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -213,6 +221,26 @@ Global
{BC3B8548-3586-4FD1-ADDE-3E524825848D}.Release|Any CPU.Build.0 = Release|Any CPU
{BC3B8548-3586-4FD1-ADDE-3E524825848D}.Release|x86.ActiveCfg = Release|Any CPU
{BC3B8548-3586-4FD1-ADDE-3E524825848D}.Release|x86.Build.0 = Release|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Debug|x86.ActiveCfg = Debug|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Debug|x86.Build.0 = Debug|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Release|Any CPU.Build.0 = Release|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Release|x86.ActiveCfg = Release|Any CPU
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB}.Release|x86.Build.0 = Release|Any CPU
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}.Debug|Any CPU.ActiveCfg = Debug|x86
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}.Debug|x86.ActiveCfg = Debug|x86
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}.Debug|x86.Build.0 = Debug|x86
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}.Release|Any CPU.ActiveCfg = Release|x86
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}.Release|x86.ActiveCfg = Release|x86
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F}.Release|x86.Build.0 = Release|x86
{51DE4702-EABC-4984-91AA-61B7D17F7742}.Debug|Any CPU.ActiveCfg = Debug|x86
{51DE4702-EABC-4984-91AA-61B7D17F7742}.Debug|x86.ActiveCfg = Debug|x86
{51DE4702-EABC-4984-91AA-61B7D17F7742}.Debug|x86.Build.0 = Debug|x86
{51DE4702-EABC-4984-91AA-61B7D17F7742}.Release|Any CPU.ActiveCfg = Release|x86
{51DE4702-EABC-4984-91AA-61B7D17F7742}.Release|x86.ActiveCfg = Release|x86
{51DE4702-EABC-4984-91AA-61B7D17F7742}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -237,6 +265,9 @@ Global
{E643CAB2-E0F2-4B53-9FDA-0A4D57205FEF} = {084448C0-49B0-44CE-850E-24E6DBE224D1}
{706A1CB8-2F7D-4FE8-B71C-2A636AE898D3} = {084448C0-49B0-44CE-850E-24E6DBE224D1}
{C417AD1B-052E-473A-892D-BFB99938598B} = {084448C0-49B0-44CE-850E-24E6DBE224D1}
{3FAF02DE-B9E8-4DDA-A8E4-7A99E6E53ACB} = {7CC06908-ED93-4B0A-81B8-55E11E04930A}
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F} = {7CC06908-ED93-4B0A-81B8-55E11E04930A}
{51DE4702-EABC-4984-91AA-61B7D17F7742} = {7CC06908-ED93-4B0A-81B8-55E11E04930A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2E6E5899-CCF7-4DE1-BE64-7EB93DC24D73}
......
......@@ -58,7 +58,7 @@ namespace FLY.Thick.FilmCasting.UI.Server
scanData = new Lc_ScanData
{
ID = 1234456,
FilmWidth = profileParam.DataRange.Width * 25.4 * (1 - 0.03),
FilmWidth = (int)(profileParam.DataRange.Width * 25.4 * (1 - 0.03)),
FilmVelocity = 40.1,
FilmPosition = 800.4,
Time = DateTime.Now.AddSeconds(-30),
......
......@@ -312,7 +312,7 @@
</ProjectReference>
<ProjectReference Include="..\FLY.Thick.FilmCasting\FLY.Thick.FilmCasting.csproj">
<Project>{e2bd6ff0-64c5-46fb-aa37-9b1f75ec6500}</Project>
<Name>FLY.Thick.Calender</Name>
<Name>FLY.Thick.FilmCasting</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
......
......@@ -44,16 +44,35 @@ namespace FLY.Thick.FilmCasting.Client
#region 状态
/// <summary>
/// 左单边不工作螺丝位
/// </summary>
public int LeftEmptyBolts { get; set; }
/// <summary>
/// 右单边不工作螺丝位
/// </summary>
public int RightEmptyBolts { get; set; }
/// <summary>
/// 收缩率 Uniform(均匀区)Shrink(收缩)Percent(比例)
/// </summary>
public double UniformShrinkPercent { get; set; }
/// <summary>
/// 膜中心位置偏移 mm
/// </summary>
public int MidOffset { get; set; }
/// <summary>
/// 总分区数
/// </summary>
public int NBolts { get; }
public int NBolts { get; set; }
/// <summary>
/// 第1个分区号
/// </summary>
public int FirstBoltNo { get; }
public int FirstBoltNo { get; set; }
#endregion
......
......@@ -36,14 +36,6 @@ namespace FLY.Thick.FilmCasting.Client
TempFrameChanged?.Invoke(this, e);
}
public event EventHandler ScanDataIdChanged;
public void Trigger_ScanDataIdChanged(ScanDataIdChangedEventArgs e)
{
ScanDataIdChanged?.Invoke(this, e);
}
public void GetTempFrame(AsyncCBHandler asyncDelegate, object asyncContext)
{
Call(nameof(GetTempFrame), null, asyncDelegate, asyncContext);
......
......@@ -40,6 +40,26 @@ namespace FLY.Thick.FilmCasting.IService
#region 状态
/// <summary>
/// 左单边不工作螺丝位
/// </summary>
int LeftEmptyBolts { get; }
/// <summary>
/// 右单边不工作螺丝位
/// </summary>
int RightEmptyBolts { get; }
/// <summary>
/// 收缩率 Uniform(均匀区)Shrink(收缩)Percent(比例)
/// </summary>
double UniformShrinkPercent { get; }
/// <summary>
/// 膜中心位置偏移 mm
/// </summary>
int MidOffset { get; }
/// <summary>
/// 总分区数
/// </summary>
......
......@@ -45,9 +45,6 @@ namespace FLY.Thick.FilmCasting.IService
/// </summary>
bool IsFinished { get; }
[Push(typeof(ScanDataIdChangedEventArgs))]
event EventHandler ScanDataIdChanged;
/// <summary>
/// 临时数据改变
/// </summary>
......
......@@ -61,7 +61,6 @@ namespace FLY.Thick.FilmCasting.Server.OBJProxy
var bulkDbObjProxy = new FObjBase.Reflect.Reflect_Proxy(objsys_idx, OBJ_INTERFACE_ID.BULKDB_ID,
typeof(IBulkDbService), gage.bulkDb);
var rejectObjProxy = new FObjBase.Reflect.Reflect_Proxy(objsys_idx, OBJ_INTERFACE_ID.REJECT_ID,
typeof(IRejectService), gage.reject);
......
......@@ -181,7 +181,7 @@ namespace FLY.Thick.FilmCasting.Server
B = profileParam.B,
FilmVelocity = Math.Round(dynArea.FilmVelocity, 1),
FilmPosition = Math.Round(dynArea.FilmPosition, 2),
FilmWidth = Math.Round(dynArea.Width, 0),
FilmWidth = (int)Math.Round(dynArea.Width, 0),
Avg = avg,
Thicks = thicks,
SampleADs = sampleAds.ToArray(),
......
......@@ -71,9 +71,6 @@ namespace FLY.Thick.FilmCasting.Server.Model
public Func<BulkDbTempFrameChangedEventArgs> GetTempFrameAction;
[Push(typeof(ScanDataIdChangedEventArgs))]
public event EventHandler ScanDataIdChanged;
/// <summary>
///
/// </summary>
......@@ -152,8 +149,6 @@ namespace FLY.Thick.FilmCasting.Server.Model
LastScanDataId = e.scandata.ID;
LastTimestamp = DateTime.Now;
ScanDataIdChanged?.Invoke(this, new ScanDataIdChangedEventArgs() { LastScanDataId = LastScanDataId });
}
/// <summary>
......
......@@ -159,7 +159,7 @@ namespace FLY.Thick.FilmCasting.Server.Model
/// 膜宽度 mm
/// </summary>
[PropertyIndex(10)]
public double FilmWidth { get; set; }
public int FilmWidth { get; set; }
/// <summary>
/// 厚度均值
......
......@@ -38,7 +38,7 @@ namespace FLY.Thick.FilmCasting.Server.Model
/// <summary>
/// 膜宽度 mm
/// </summary>
public double FilmWidth { get; set; }
public int FilmWidth { get; set; }
/// <summary>
/// 厚度均值
......
......@@ -2,9 +2,7 @@
using FLY.Thick.Base.IService;
using FLY.Thick.Base.Server;
using FLY.Thick.FilmCasting.Common;
using FLY.Thick.FilmCasting.Server;
using FLY.Thick.FilmCasting.Server.Model;
using FLY.Thick.RemoteHistory;
using FlyADBase;
using FObjBase;
......@@ -12,7 +10,6 @@ using Misc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
......@@ -216,7 +213,7 @@ namespace FLY.Thick.FilmCasting.Server
borderSearch = new BorderSearch(null);//边界查找
boltmap = new BoltMapFilmCasting();//分区信息
curve = new CurveCollection(null);//AD转thick
......@@ -258,7 +255,7 @@ namespace FLY.Thick.FilmCasting.Server
}
void updateBoltmap()
void updateBoltmap()
{
FObjBase.PollModule.Current.Poll_JustOnce(() =>
{
......@@ -271,7 +268,7 @@ namespace FLY.Thick.FilmCasting.Server
}, this, MARKNO_UPDATEBOLTMAP);
}
async Task Init_db()
async Task Init_db()
{
//数据库 配置----------------------------------------
//就只是数据库操作会慢而已!!!!!!
......@@ -287,7 +284,7 @@ namespace FLY.Thick.FilmCasting.Server
//备份上一个月之前的数据到 yyyy-MM 文件夹
dbModel.BackupBbInSize(initParam.DBKeepMonth);
//当前的数据库只保存上个月与这个月的数据
dbModel.KeepDBSize(1);
});
......@@ -295,7 +292,7 @@ namespace FLY.Thick.FilmCasting.Server
historyDb.Init(dbModel, localDb);
bulkDb.Init(historyDb, localDb, dbModel);
}
public async Task Init()
public async Task Init()
{
//数据库 配置----------------------------------------
......@@ -321,7 +318,7 @@ namespace FLY.Thick.FilmCasting.Server
initParam.PropertyChanged += (s, e) =>
{
if ((e.PropertyName == nameof(initParam.Encoder1_mmpp))
||(e.PropertyName == nameof(initParam.PosLength)))
|| (e.PropertyName == nameof(initParam.PosLength)))
{
updateBoltmap();
}
......@@ -334,7 +331,8 @@ namespace FLY.Thick.FilmCasting.Server
{
updateBoltmap();
}
else if (e.PropertyName == nameof(profileParam.MidOffset)) {
else if (e.PropertyName == nameof(profileParam.MidOffset))
{
boltmap.MidOffset = profileParam.MidOffset;
}
};
......@@ -387,7 +385,8 @@ namespace FLY.Thick.FilmCasting.Server
flyAd.Connect();
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.HardwareVersion), () => {
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.HardwareVersion), () =>
{
FlyADIODefine.SetInstance(new FlyADIODefine());
FlyADIODefine.Instance.SerVersion(flyAd.HardwareVersion);
});
......@@ -399,7 +398,8 @@ namespace FLY.Thick.FilmCasting.Server
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.OStatus), DynArea, nameof(DynArea.OStatus));
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.Position), DynArea, nameof(DynArea.Position));
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.Position), () => {
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.Position), () =>
{
DynArea.PosMm = flyAd.Position * initParam.Encoder1_mmpp;//mm
});
......@@ -409,7 +409,8 @@ namespace FLY.Thick.FilmCasting.Server
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.PosOfGrid), initParam, nameof(initParam.PosOfGrid));
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.Speed), () => {
Misc.BindingOperations.SetBinding(flyAd, nameof(flyAd.Speed), () =>
{
double speed = flyAd.Speed * initParam.Encoder1_mmpp;//mm/s
speed = speed * 60 / 1000;//m/min
DynArea.Velocity = speed;
......@@ -417,7 +418,8 @@ namespace FLY.Thick.FilmCasting.Server
Misc.BindingOperations.SetBinding(
flyAd, new string[] { nameof(flyAd.Ratio02), nameof(flyAd.Ratio01) },
() => {
() =>
{
initParam.Speed1Scale = (double)flyAd.Ratio02 / flyAd.Ratio01;
});
......@@ -613,7 +615,7 @@ namespace FLY.Thick.FilmCasting.Server
if (timer == 0)
{
mWarning.Add(errno.Code,errno.Descrption);
mWarning.Add(errno.Code, errno.Descrption);
}
}
}
......@@ -648,7 +650,7 @@ namespace FLY.Thick.FilmCasting.Server
{
return false;
}
return DynArea.AD < (DynArea.ADMax * 0.01);
return DynArea.AD < (DynArea.ADMax * 0.01);
}
});
......@@ -862,7 +864,7 @@ namespace FLY.Thick.FilmCasting.Server
#region 数据库备份检测
DispatcherTimer backupDbTimer;
DateTime StartupTime;
void BackupDbCheckInit()
void BackupDbCheckInit()
{
StartupTime = DateTime.Now;
......@@ -880,7 +882,7 @@ namespace FLY.Thick.FilmCasting.Server
if (DateTime.Now.Hour < 9 || DateTime.Now.Hour > 20)
return;
if (DateTime.Now - StartupTime > TimeSpan.FromDays(28) && DateTime.Now.Month != StartupTime.Month)
if (DateTime.Now - StartupTime > TimeSpan.FromDays(28) && DateTime.Now.Month != StartupTime.Month)
{
//已经连续开机1个月,需要重新启动程序
warning.Add(
......
Subproject commit 64064eb49ba70a22f57160b88f62c4e398eb1e9c
Subproject commit 00b4f2b16d336ccd8a50a29271569abadbd32ddb
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