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

修复 做错事情,把固锐的模拟器删除了, 吹膜的模拟器也弄到不能动了。 恢复了

parent 05db5192
......@@ -80,7 +80,7 @@ namespace FLY.Simulation.Blowing
#region
/// <summary>
/// 膜泡压扁后总宽度,单位 脉冲
/// 膜泡压扁后总宽度,单位 mm
/// </summary>
public double FilmWidth { get; set; }
......@@ -229,7 +229,7 @@ namespace FLY.Simulation.Blowing
AngleDecTime = 5;//减速时间5s
AngleCoolTime = 5;//正反转延迟时间5s
FilmWidth = 2.3;//膜宽2.3m
FilmWidth = 2300;//膜宽2300mm
FilmVelocity = 20;//线速度m/min
FilmDistance = 26;//膜距离m
......@@ -550,9 +550,9 @@ namespace FLY.Simulation.Blowing
/// <summary>
/// 给定相对于膜横向位置, 输出当前对应的厚度
/// </summary>
/// <param name="pos_m"></param>
/// <param name="pos_mm"></param>
/// <returns></returns>
public FilmData GetData(double pos_m)
public FilmData GetData(double pos_mm)
{
//double ago_filmlength = CurrFilmLength - CurrFilmDistance;
double angle;
......@@ -564,7 +564,7 @@ namespace FLY.Simulation.Blowing
//if (!SearchAngleFromPositionList(ago_filmlength, out angle))
// return null;
return GetData(pos_m, angle);
return GetData(pos_mm, angle);
}
double GetValidAngle(double a) {
......@@ -577,17 +577,17 @@ namespace FLY.Simulation.Blowing
/// <summary>
/// 获取膜泡数据
/// </summary>
/// <param name="position">相对于膜泡位置,横向</param>
/// <param name="position_mm">相对于膜泡位置,横向</param>
/// <param name="angle">人字架角度</param>
/// <returns></returns>
FilmData GetData(double position, double angle)
FilmData GetData(double position_mm, double angle)
{
if ((position < 0) || (position > FilmWidth))
if ((position_mm < 0) || (position_mm > FilmWidth))
{
return null;
}
//与0°的偏移
double a = position / FilmWidth * 180;
double a = position_mm / FilmWidth * 180;
//压扁对面的角度
double a_other = 360 - a;
......
......@@ -79,9 +79,8 @@ namespace FLY.Simulation.Blowing
if ((mm >= FilmBegin) && (mm<(FilmBegin+FilmWidth)))
{
int position = mm-FilmBegin;
double pos_m = position / 1000.0;
FilmData fd = mBlowing.GetData(pos_m);
int position_mm = mm-FilmBegin;
FilmData fd = mBlowing.GetData(position_mm);
if (fd != null)
{
data += fd.data1 + fd.data2;
......@@ -92,13 +91,13 @@ namespace FLY.Simulation.Blowing
double thick = data / 100.0;
return curve.Value2Ad(thick, AD2ValueFlag.NoRevised);
}
int GetAD_2(int pos)
int GetAD_2(int mm)
{
int[] datas = new int[SenserWidth];
for (int i = 0; i < SenserWidth; i++)
{
datas[i] = GetAD_1(pos - SenserWidth / 2 + i);
datas[i] = GetAD_1(mm - SenserWidth / 2 + i);
}
//求平均值
return (int)datas.Average();
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLY.Simulation.Calender.GuRuiShiYe</RootNamespace>
<AssemblyName>FLY.Simulation.Calender.GuRuiShiYe</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Gage.cs" />
<Compile Include="GageAD.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Project.FLY.Misc\MISC\Misc.csproj">
<Project>{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}</Project>
<Name>Misc</Name>
</ProjectReference>
<ProjectReference Include="..\FLY.Simulation.Flyad7\FLY.Simulation.Flyad7.csproj">
<Project>{ae180a75-fafa-4c5e-8767-0a26447936b6}</Project>
<Name>FLY.Simulation.Flyad7</Name>
</ProjectReference>
<ProjectReference Include="..\FLY.Simulation\FLY.Simulation.csproj">
<Project>{150f2411-fe62-4042-a968-33e416dc56a1}</Project>
<Name>FLY.Simulation</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="EPPlus">
<Version>4.5.3.2</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressWarnings" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FLY.Simulation.Calender.GuRuiShiYe
{
public class Gage:INotifyPropertyChanged
{
public FLY.Simulation.Flyad7.FLYAD7[] FlyAds { get; private set; }
public GageAd[] GageAds { get; private set; }
FLY.Simulation.Flyad7.FLYAD7[] flyads;
GageAd[] gageAds;
public Gage() {
}
public event PropertyChangedEventHandler PropertyChanged;
public void Init(int devCnt) {
gageAds = new GageAd[devCnt];
flyads = new Flyad7.FLYAD7[devCnt];
for (int i = 0; i < devCnt; i++) {
gageAds[i] = new GageAd();
gageAds[i].Init($"{i:D2}", i > 0 ? gageAds[i - 1].GetFilmValue:null);
flyads[i] = new Flyad7.FLYAD7($@"{i:D2}\flyad.json");
flyads[i].Init(gageAds[i]);
}
FlyAds = flyads;
GageAds = gageAds;
}
}
}
using AutoMapper;
using FLY.Thick.Base.Common;
using FLY.Thick.Base.Server;
using Newtonsoft.Json;
using OfficeOpenXml;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
namespace FLY.Simulation.Calender.GuRuiShiYe
{
public class GageAd : ISimulationGageAD
{
#region 涂料轮廓
/// <summary>
/// 涂料的横向视图, 精度1mm,
/// um
/// </summary>
public List<double> HorizontalView = new List<double>();
/// <summary>
/// 涂料的纵向视图,精度1mm,纵向是周长发生的
/// um
/// </summary>
public List<double> VerticalView = new List<double>();
#endregion
#region 机架信息
/// <summary>
/// 机架视图 AD值,精度1mm,
/// </summary>
public List<double> GageView = new List<double>();
/// <summary>
/// 机架视图 均值
/// </summary>
public double GageViewAvg { get; set; }
public double Mmpp { get; set; } = 0.0945;
/// 编码器2 mm/p 胶轮周长200mm,编码器 转1圈800脉冲 正确应该0.25
/// </summary>
public double Mmpp2 = 0.24925;
public int TotalLength { get; private set; } = 1600;
/// <summary>
/// 测速辊周长 314mm
/// </summary>
public double MmOfRoll { get; set; } = 314;
/// <summary>
/// 测速辊上接近开关信号长度
/// </summary>
public double MmOfRoundSign { get; set; } = 10;
/// <summary>
/// 纵向位置偏移 单位m
/// </summary>
public double FilmPositionOffset { get; set; }
#endregion
/// <summary>
/// 相对于机架 左起始位置 mm
/// </summary>
public int FilmBegin { get; set; } = 170;
/// <summary>
/// 纵向速度 m/min
/// </summary>
public double FilmVelocity { get; set; } = 20;
/// <summary>
/// 当前极片位置 m
/// </summary>
public double FilmPosition { get; set; } = 0;
private double filmPosition_real;
public bool IsSyncLight { get; set; }
/// <summary>
/// AD曲线
/// </summary>
public CurveCollection curve;
string gageName;
/// <summary>
/// 获取膜上厚度值
/// </summary>
/// <param name="mm_h">膜上横向位置</param>
/// <param name="mm_v">膜上纵向位置</param>
/// <returns></returns>
public delegate double GetFilmValueHandler(int mm_h, int mm_v);
GetFilmValueHandler GetBaseMaterialValue;
public GetFilmValueHandler GetFilmValue;
public GageAd() {
GetFilmValue = new GetFilmValueHandler(_GetFilmValue);
}
private double _GetFilmValue(int mm_h, int mm_v)
{
if (mm_h >= 0 && mm_h < HorizontalView.Count)
{
double bValue = 0;
if (GetBaseMaterialValue != null)
bValue = GetBaseMaterialValue(mm_h, mm_v);
var hValue = HorizontalView[mm_h];
int vIndex = (int)GetRemainder(mm_v, VerticalView.Count());
var vValue = VerticalView[vIndex];
return bValue+(vValue + hValue) / 2;
}
else {
return 0;
}
}
public void Init(string gageName, GetFilmValueHandler getBaseMaterialValue)
{
this.gageName = gageName;
this.GetBaseMaterialValue = getBaseMaterialValue;
curve = new CurveCollection($@"{gageName}\curve.json");
LoadXlsx_film($@"{gageName}\FilmView.xlsx");
LoadXlsx_scancorr($@"{gageName}\GageView.xlsx");
if (!GageAdJsonDb.Load(this, $@"{gageName}\gageAd.json"))
GageAdJsonDb.Save(this, $@"{gageName}\gageAd.json");
GageViewAvg = GageView.Average();
TotalLength = GageView.Count();
}
void Load_double(List<double> datas, string csvFilePath)
{
datas.Clear();
using (StreamReader sr = new StreamReader(csvFilePath))
{
string header = sr.ReadLine();//标题 , Thick, HSign
while (!sr.EndOfStream)
{
string s = sr.ReadLine();
string[] ss = s.Split(',');
double thk = double.Parse(ss[0]);
datas.Add(thk);
}
sr.Close();
}
}
private void LoadXlsx_film(string filepath)
{
//检测标题
DataTable dataTable_h = new DataTable("table_horizontal");
dataTable_h.Columns.Add(new DataColumn() { ColumnName = "位置mm", DataType = typeof(double), Caption = "0" });
dataTable_h.Columns.Add(new DataColumn() { ColumnName = "涂料", DataType = typeof(double), Caption = "0" });
DataTable dataTable_v = new DataTable("table_vertical");
dataTable_v.Columns.Add(new DataColumn() { ColumnName = "位置mm", DataType = typeof(double), Caption = "0" });
dataTable_v.Columns.Add(new DataColumn() { ColumnName = "涂料", DataType = typeof(double), Caption = "0" });
using (ExcelPackage p = new ExcelPackage(new FileInfo(filepath)))
{
ExcelWorksheet sheet = p.Workbook.Worksheets["横向数据"];
FromSheet(sheet, dataTable_h);
ExcelWorksheet sheet2 = p.Workbook.Worksheets["纵向数据"];
FromSheet(sheet2, dataTable_v);
}
HorizontalView.Clear();
for (int i = 0; i < dataTable_h.Rows.Count; i++)
{
double mm = (double)dataTable_h.Rows[i]["位置mm"];
double value = (double)dataTable_h.Rows[i]["涂料"];
for (int j = HorizontalView.Count(); j <= mm; j++)
{
HorizontalView.Add(value);
}
}
VerticalView.Clear();
for (int i = 0; i < dataTable_v.Rows.Count; i++)
{
double mm = (double)dataTable_v.Rows[i]["位置mm"];
double value = (double)dataTable_v.Rows[i]["涂料"];
for (int j = VerticalView.Count(); j <= mm; j++)
{
VerticalView.Add(value);
}
}
}
private void LoadXlsx_scancorr(string filepath)
{
//检测标题
DataTable dataTable = new DataTable("table_scancorr");
dataTable.Columns.Add(new DataColumn() { ColumnName = "序号", DataType = typeof(double), Caption = "0" });
dataTable.Columns.Add(new DataColumn() { ColumnName = "脉冲", DataType = typeof(double), Caption = "0" });
dataTable.Columns.Add(new DataColumn() { ColumnName = "位置mm", DataType = typeof(double), Caption = "0" });
dataTable.Columns.Add(new DataColumn() { ColumnName = "正向原始", DataType = typeof(double), Caption = "0" });
dataTable.Columns.Add(new DataColumn() { ColumnName = "反向原始", DataType = typeof(double), Caption = "0" });
dataTable.Columns.Add(new DataColumn() { ColumnName = "正向滤波", DataType = typeof(double), Caption = "0" });
dataTable.Columns.Add(new DataColumn() { ColumnName = "反向滤波", DataType = typeof(double), Caption = "0" });
using (ExcelPackage p = new ExcelPackage(new FileInfo(filepath)))
{
ExcelWorksheet sheet = p.Workbook.Worksheets["机架修正"];
FromSheet(sheet, dataTable);
}
//获取正向滤波数据
GageView.Clear();
for (int i = 0; i < dataTable.Rows.Count; i++)
{
double mm = (double)dataTable.Rows[i]["位置mm"];
double ad = (double)dataTable.Rows[i]["正向滤波"];
for (int j = GageView.Count(); j <= mm; j++)
{
GageView.Add(ad);
}
}
}
void FromSheet(ExcelWorksheet sheet, DataTable dataTable)
{
int from_row = 1;
int row = from_row;
for (int i = 0; i < dataTable.Columns.Count; i++)
{
int col = i + 1;
if ((string)(sheet.Cells[row, col].Value) != dataTable.Columns[i].ColumnName)
{
throw new Exception($"格式出错, 第{i}列 不是{dataTable.Columns[i].ColumnName}");
}
}
row++;
while (true)
{
var newRow = dataTable.NewRow();
//当一行都是空的,认为没有数据
int nullCnt = 0;
for (int j = 0; j < dataTable.Columns.Count; j++)
{
int col = j + 1;
object value = sheet.Cells[row, col].Value;
if (value is string || value == null)
{
if (string.IsNullOrEmpty((string)(value)))
{
//空的
nullCnt++;
//continue;
return;
}
}
try
{
newRow[j] = sheet.Cells[row, col].Value;
}
catch (Exception e)
{
throw e;
}
}
if (nullCnt == dataTable.Columns.Count)
{
//没有数据了
break;
}
dataTable.Rows.Add(newRow);
row++;
}
}
DateTime lastTime = DateTime.MinValue;
public void OnPoll(DateTime now)
{
if (lastTime == DateTime.MinValue)
{
lastTime = now;
return;
}
var ts = now - lastTime;
double ms = 1.0 * ts.Ticks / TimeSpan.TicksPerMillisecond;
double minute = ms / 1000 / 60;
if (FilmVelocity != 0)
{
filmPosition_real += minute * FilmVelocity;
}
FilmPosition = filmPosition_real - FilmPositionOffset;
//int index = (int)(filmPosition_real * 1000 % VerticalView.Count());
lastTime = now;
}
public int GetAD(int mm)
{
if (mm < 0)
return (int)GageView[0];
else if (mm >= GageView.Count())
return (int)GageView.Last();
if (mm < FilmBegin || mm >= FilmBegin+HorizontalView.Count()) {
//膜的外面
return (int)GageView[mm];
}
int posLength = (int)(FilmPosition * 1000);
double value = GetFilmValue(mm - FilmBegin, posLength);
double ad = curve.Value2Ad(value, AD2ValueFlag.NoRevised);
double ad_zero = curve.Value2Ad(0, AD2ValueFlag.NoRevised);
//ad *= GageViewAvg / ad_zero;
//ad *= GageView[mm] / GageViewAvg;
ad *= GageView[mm] / ad_zero;
if (ad > 65535)
ad = 65535;
else if (ad < 0)
ad = 0;
return (int)ad;
}
public ushort GetInput()
{
UInt16 istatus = 0x0fff;
double mmInRoll = GetRemainder(FilmPosition * 1000, MmOfRoll);
if (mmInRoll < MmOfRoundSign)
{
//亮灯
Misc.MyBase.CLEARBIT(ref istatus, IODefinition.IN_RSENSOR);
}
if (IsSyncLight)
Misc.MyBase.CLEARBIT(ref istatus, IODefinition.IN_SYNC);
return istatus;
}
static double GetRemainder(double a, double b)
{
if (a >= 0)
{
return a % b;
}
else
{
double ret = a % b;
if (ret != 0)
ret += Math.Abs(b);
return ret;
}
}
public int GetPosition2()
{
return (int)(FilmPosition * 1000 / Mmpp2);
}
public int GetSpeed2()
{
return (int)(FilmVelocity * 1000 / 60 / Mmpp2);
}
public void SetOutput(ushort output)
{
if (!Misc.MyBase.CHECKBIT(output, IODefinition.OUT_SYNC))
IsSyncLight = true;
else
IsSyncLight = false;
}
}
public class GageAdJsonDb
{
static Mapper Mapper { get; } = new AutoMapper.Mapper(new MapperConfiguration(c =>
{
c.CreateMap<GageAd, GageAdJsonDb>().ReverseMap();
}));
public static bool Save(GageAd src, string filePath)
{
if (string.IsNullOrEmpty(filePath))
return false;
var p = Mapper.Map<GageAdJsonDb>(src);
try
{
File.WriteAllText(filePath, JsonConvert.SerializeObject(p, Formatting.Indented));
return true;
}
catch
{
//异常,没有json 编码失败
}
return false;
}
public static bool Load(GageAd src, string filePath)
{
if (string.IsNullOrEmpty(filePath))
return false;
try
{
if (File.Exists(filePath))
{
string json = File.ReadAllText(filePath);
var p = JsonConvert.DeserializeObject<GageAdJsonDb>(json);
Mapper.Map(p, src);
return true;
}
}
catch
{
//异常,没有json 解码失败
}
return false;
}
public double FilmPositionOffset;
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("FLY.Simulation.Calender.GuRuiShiYe")]
[assembly: AssemblyDescription("绵阳固瑞实业3台涂布线 AD盒模拟器")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FLY.Simulation.Calender.GuRuiShiYe")]
[assembly: AssemblyCopyright("Copyright © 2021 flyautomation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("aeadfc07-59d9-40c4-bb31-47cffda6cc5c")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
......@@ -133,7 +133,11 @@ namespace FLY.Simulation.Flyad7
mSimGageAD = new FLY.Simulation.Coating.GageAD();
break;
default:
throw new Exception("不支持 SIM_MODE" + mSimGageAD.ToString());
{
mSimGageAD = new FLY.Simulation.Blowing.GageAD();
mSimMode = SIM_MODE.Blowing;
break;
}
}
Init2();
......
......@@ -31,7 +31,7 @@ namespace FLY.Simulation.Flyad7.OBJProxy
}break;
case FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.GET_STATE:
{
FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.Pack_DriveState pack = new FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.Pack_DriveState();
FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.Pack_DriveState_2 pack = new FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.Pack_DriveState_2();
pack.order = Data.DriveOrder;
pack.status = Data.DriveStatus;
pack.marker = Data.Marker;
......
......@@ -89,7 +89,7 @@ namespace FLY.Simulation.Flyad7.OBJProxy
else if ((e.PropertyName == nameof(Data.DriveStatus))||(e.PropertyName == nameof(Data.Marker)))
{
CurrObjSys.PushObjInfoEx(this, FLYAD7_OBJ_INTERFACE.PUSH_DATA_INTERFACE.PUSH_STATUS,
new FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.Pack_DriveState
new FLYAD7_OBJ_INTERFACE.DRIVE_MAN_INTERFACE.Pack_DriveState_2
{
order = Data.DriveOrder,
status = Data.DriveStatus,
......
......@@ -116,7 +116,7 @@ namespace FLY.Simulation.Flyad7
/// 当前脉冲
/// </summary>
double m_currpos => m_physicalPos + m_offset + PosOffset;
double m_physicalPos = 990;
double m_physicalPos = 3200;
/// <summary>
/// 归0信号偏移
/// </summary>
......
......@@ -40,8 +40,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Simulation.Battery.RayL
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLYAD7.Simulation.Battery.RayLaser", "FLYAD7.Simulation.Battery.RayLaser\FLYAD7.Simulation.Battery.RayLaser.csproj", "{DFD5FDFA-6E8D-4901-8708-D7EF0269EE6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Simulation.Calender.GuRuiShiYe", "FLY.Simulation.Calender.GuRuiShiYe\FLY.Simulation.Calender.GuRuiShiYe.csproj", "{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Simulation.Calender.GuRuiShiYe.UI", "FLY.Simulation.Calender.GuRuiShiYe.UI\FLY.Simulation.Calender.GuRuiShiYe.UI.csproj", "{517847E4-5708-4ACE-BDF0-BB2C4495136D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyAd2021", "FlyAd2021\FlyAd2021.csproj", "{9521A8F9-7310-49B3-A951-594EFE9D3EF0}"
......@@ -50,6 +48,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyAd2021_WPF", "FlyAd2021_
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.ModbusMapper", "..\Project.FLY.ModbusMapper\FLY.ModbusMapper\FLY.ModbusMapper.csproj", "{6D4B9BDA-2A66-4583-B244-758BC4213D9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Simulation.Calender.GuRuiShiYe", "FLY.Simulation.Calender.GuRuiShiYe\FLY.Simulation.Calender.GuRuiShiYe.csproj", "{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -224,18 +224,6 @@ Global
{DFD5FDFA-6E8D-4901-8708-D7EF0269EE6A}.Release|Mixed Platforms.Build.0 = Release|x86
{DFD5FDFA-6E8D-4901-8708-D7EF0269EE6A}.Release|x86.ActiveCfg = Release|x86
{DFD5FDFA-6E8D-4901-8708-D7EF0269EE6A}.Release|x86.Build.0 = Release|x86
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|x86.ActiveCfg = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|x86.Build.0 = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Any CPU.Build.0 = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|x86.ActiveCfg = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|x86.Build.0 = Release|Any CPU
{517847E4-5708-4ACE-BDF0-BB2C4495136D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{517847E4-5708-4ACE-BDF0-BB2C4495136D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{517847E4-5708-4ACE-BDF0-BB2C4495136D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
......@@ -282,6 +270,18 @@ Global
{6D4B9BDA-2A66-4583-B244-758BC4213D9F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{6D4B9BDA-2A66-4583-B244-758BC4213D9F}.Release|x86.ActiveCfg = Release|Any CPU
{6D4B9BDA-2A66-4583-B244-758BC4213D9F}.Release|x86.Build.0 = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|x86.ActiveCfg = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Debug|x86.Build.0 = Debug|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Any CPU.Build.0 = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|x86.ActiveCfg = Release|Any CPU
{AEADFC07-59D9-40C4-BB31-47CFFDA6CC5C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -95,7 +95,6 @@ namespace FlyAd2021
{
fGrid.SetSize(PosLen / PosOfGrid);
TimeGridAdvHelperExt.ad_ts_ms = 1;
mTimeGridAdvHelper.Init();
this.PropertyChanged += FlyAD7_PropertyChanged1;
......@@ -435,7 +434,7 @@ namespace FlyAd2021
{
Time = lastUpdateADTime,
Data = adList.ToArray(),
Ts = TimeGridAdvHelperExt.ad_ts
Ts = TimeSpan.FromMilliseconds(1)
});
lastUpdateADTime = Now;
......
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