Commit f56d3329 刘韬

出厂前

1 个父辈 fb156731
正在显示 51 个修改的文件 包含 1406 行增加288 行删除
...@@ -19,6 +19,7 @@ Global ...@@ -19,6 +19,7 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Description = 汇川模块的SISO料仓
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
......
此文件类型无法预览
...@@ -53,8 +53,17 @@ ...@@ -53,8 +53,17 @@
<ApplicationIcon>box.ico</ApplicationIcon> <ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net"> <Reference Include="CodeLibrary, Version=1.0.7874.27460, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\dll\log4net.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="HuichuanLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -131,9 +140,15 @@ ...@@ -131,9 +140,15 @@
<Compile Include="useControl\AxisMoveControl.cs"> <Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="useControl\AxisMoveControl.Designer.cs"> <Compile Include="useControl\AxisMoveControl.designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="useControl\uc_AxisDebug.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\uc_AxisDebug.Designer.cs">
<DependentUpon>uc_AxisDebug.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="FrmInOutStore.resx"> <EmbeddedResource Include="FrmInOutStore.resx">
<DependentUpon>FrmInOutStore.cs</DependentUpon> <DependentUpon>FrmInOutStore.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -174,6 +189,9 @@ ...@@ -174,6 +189,9 @@
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="useControl\uc_AxisDebug.resx">
<DependentUpon>uc_AxisDebug.cs</DependentUpon>
</EmbeddedResource>
<None Include="resource\language.resource"> <None Include="resource\language.resource">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
...@@ -33,15 +33,17 @@ ...@@ -33,15 +33,17 @@
<!--解码方式,0=halcon 解码,1=西安料仓 使用zxing解码,2=成都料仓--> <!--解码方式,0=halcon 解码,1=西安料仓 使用zxing解码,2=成都料仓-->
<add key="DeCodeType" value="0"/> <add key="DeCodeType" value="0"/>
<add key ="DefaultPWD" value ="123456"/> <add key="DefaultPWD" value ="123456"/>
<add key="UseAIOBOX" value="1"/>
<!--是否使用蜂鸣器--> <!--是否使用蜂鸣器-->
<add key ="UseBuzzer" value ="1"/> <add key ="UseBuzzer" value ="1"/>
<add key ="StartScan_CMD" value ="S"/> <add key ="StartScan_CMD" value ="S"/>
<add key ="ShowLanguageMsg" value ="1"/> <add key ="ShowLanguageMsg" value ="1"/>
<!--每盘料扫码的次数--> <!--每盘料扫码的次数-->
<add key ="MaxScanCount" value ="2"/> <add key ="MaxScanCount" value ="2"/>
</appSettings> <add key="CameraName" value="GigE:acA3800-10gc (23124327)#GigE:acA3800-10gc (23172285)" />
<add key="CodeType" value="Data Matrix ECC 200#QR Code#PDF417" />
<add key="CodeParamPath" value="\CodeParam\" />
</appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="logs/Store-%property{fname}.log"/> <file type="log4net.Util.PatternString" value="logs/Store-%property{fname}.log"/>
......
...@@ -26,10 +26,8 @@ ...@@ -26,10 +26,8 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.txtDOIndex = new System.Windows.Forms.TextBox(); this.txtDOIndex = new System.Windows.Forms.TextBox();
this.txtDoName = new System.Windows.Forms.TextBox(); this.txtDoName = new System.Windows.Forms.TextBox();
this.btnCloseAxisBreak = new System.Windows.Forms.Button();
this.label17 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label();
this.btnReadIO = new System.Windows.Forms.Button(); this.btnReadIO = new System.Windows.Forms.Button();
this.btnOpenAxisBreak = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.btnWriteSingleDO = new System.Windows.Forms.Button(); this.btnWriteSingleDO = new System.Windows.Forms.Button();
this.txtWriteTime = new System.Windows.Forms.TextBox(); this.txtWriteTime = new System.Windows.Forms.TextBox();
...@@ -71,7 +69,7 @@ ...@@ -71,7 +69,7 @@
// //
// timer1 // timer1
// //
this.timer1.Interval = 1000; this.timer1.Interval = 300;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// groupBox1 // groupBox1
...@@ -86,10 +84,8 @@ ...@@ -86,10 +84,8 @@
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtDOIndex); this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName); this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.btnCloseAxisBreak);
this.groupBox1.Controls.Add(this.label17); this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.btnReadIO); this.groupBox1.Controls.Add(this.btnReadIO);
this.groupBox1.Controls.Add(this.btnOpenAxisBreak);
this.groupBox1.Controls.Add(this.label14); this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.btnWriteSingleDO); this.groupBox1.Controls.Add(this.btnWriteSingleDO);
this.groupBox1.Controls.Add(this.txtWriteTime); this.groupBox1.Controls.Add(this.txtWriteTime);
...@@ -193,17 +189,6 @@ ...@@ -193,17 +189,6 @@
this.txtDoName.TabIndex = 241; this.txtDoName.TabIndex = 241;
this.txtDoName.Text = "0"; this.txtDoName.Text = "0";
// //
// btnCloseAxisBreak
//
this.btnCloseAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAxisBreak.Location = new System.Drawing.Point(173, 236);
this.btnCloseAxisBreak.Name = "btnCloseAxisBreak";
this.btnCloseAxisBreak.Size = new System.Drawing.Size(144, 43);
this.btnCloseAxisBreak.TabIndex = 253;
this.btnCloseAxisBreak.Text = "关闭刹车";
this.btnCloseAxisBreak.UseVisualStyleBackColor = true;
this.btnCloseAxisBreak.Click += new System.EventHandler(this.btnCloseAxisBreak_Click);
//
// label17 // label17
// //
this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -226,17 +211,6 @@ ...@@ -226,17 +211,6 @@
this.btnReadIO.UseVisualStyleBackColor = true; this.btnReadIO.UseVisualStyleBackColor = true;
this.btnReadIO.Click += new System.EventHandler(this.btnReadIO_Click); this.btnReadIO.Click += new System.EventHandler(this.btnReadIO_Click);
// //
// btnOpenAxisBreak
//
this.btnOpenAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxisBreak.Location = new System.Drawing.Point(173, 189);
this.btnOpenAxisBreak.Name = "btnOpenAxisBreak";
this.btnOpenAxisBreak.Size = new System.Drawing.Size(144, 43);
this.btnOpenAxisBreak.TabIndex = 252;
this.btnOpenAxisBreak.Text = "打开刹车";
this.btnOpenAxisBreak.UseVisualStyleBackColor = true;
this.btnOpenAxisBreak.Click += new System.EventHandler(this.btnOpenAxisBreak_Click);
//
// label14 // label14
// //
this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -352,6 +326,7 @@ ...@@ -352,6 +326,7 @@
this.button1.TabIndex = 254; this.button1.TabIndex = 254;
this.button1.Text = "关闭"; this.button1.Text = "关闭";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// chbAutoRead // chbAutoRead
...@@ -367,6 +342,7 @@ ...@@ -367,6 +342,7 @@
this.chbAutoRead.TabIndex = 244; this.chbAutoRead.TabIndex = 244;
this.chbAutoRead.Text = "自动读取"; this.chbAutoRead.Text = "自动读取";
this.chbAutoRead.UseVisualStyleBackColor = true; this.chbAutoRead.UseVisualStyleBackColor = true;
this.chbAutoRead.Visible = false;
// //
// groupBox4 // groupBox4
// //
...@@ -693,8 +669,6 @@ ...@@ -693,8 +669,6 @@
private System.Windows.Forms.TextBox txtDoName; private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Button btnCloseDoor; private System.Windows.Forms.Button btnCloseDoor;
private System.Windows.Forms.Button btnOpenDoor; private System.Windows.Forms.Button btnOpenDoor;
private System.Windows.Forms.Button btnCloseAxisBreak;
private System.Windows.Forms.Button btnOpenAxisBreak;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnCloseLed; private System.Windows.Forms.Button btnCloseLed;
private System.Windows.Forms.Button btnOpenLed; private System.Windows.Forms.Button btnOpenLed;
......
...@@ -90,7 +90,7 @@ namespace OnlineStore.ACSingleStore ...@@ -90,7 +90,7 @@ namespace OnlineStore.ACSingleStore
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
if (chbAutoRead.Checked) if (chbAutoRead.Checked && this.Visible)
{ {
ReadIOList(); ReadIOList();
} }
...@@ -98,7 +98,7 @@ namespace OnlineStore.ACSingleStore ...@@ -98,7 +98,7 @@ namespace OnlineStore.ACSingleStore
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e) private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
{ {
AIManager.Instance.NeedShow = false; //AIManager.Instance.NeedShow = false;
try try
{ {
if (this.timer1.Enabled) if (this.timer1.Enabled)
...@@ -161,7 +161,7 @@ namespace OnlineStore.ACSingleStore ...@@ -161,7 +161,7 @@ namespace OnlineStore.ACSingleStore
private void FrmStoreIOStatus_Load(object sender, EventArgs e) private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{ {
AIManager.Instance.NeedShow = true; //AIManager.Instance.NeedShow = true;
if (boxBean.Config.StoreDOList.ContainsKey(IO_Type.Device_Led)) if (boxBean.Config.StoreDOList.ContainsKey(IO_Type.Device_Led))
{ {
btnDevideLed.Visible = true; btnDevideLed.Visible = true;
...@@ -230,10 +230,10 @@ namespace OnlineStore.ACSingleStore ...@@ -230,10 +230,10 @@ namespace OnlineStore.ACSingleStore
} }
} }
double ai1Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI1_Addr); double ai1Value = IOManager.GetADIOValue(StoreManager.Config.AIDI1_Addr);
double ai2Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI2_Addr); double ai2Value = IOManager.GetADIOValue(StoreManager.Config.AIDI2_Addr);
double ai3Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI3_Addr); double ai3Value = IOManager.GetADIOValue(StoreManager.Config.AIDI3_Addr);
double ai4Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, StoreManager.Config.AIDI4_Addr); double ai4Value = IOManager.GetADIOValue(StoreManager.Config.AIDI4_Addr);
//double ai3Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, 3); //double ai3Value = AIManager.Instance.GetAIValue(boxBean.Config.AIDevice_IP, 3);
txtAI1.Text = ai1Value.ToString(); txtAI1.Text = ai1Value.ToString();
...@@ -242,16 +242,21 @@ namespace OnlineStore.ACSingleStore ...@@ -242,16 +242,21 @@ namespace OnlineStore.ACSingleStore
txtAI4.Text = ai4Value.ToString(); txtAI4.Text = ai4Value.ToString();
//txtAI3.Text = ai3Value.ToString(); //txtAI3.Text = ai3Value.ToString();
txtAIResult1.Text = AIManager.ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString(); txtAIResult1.Text = ConvertAI(ai1Value,boxBean.Config.AIDI1_DefaultPosition).ToString();
txtAIResult2.Text = AIManager.ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString(); txtAIResult2.Text = ConvertAI(ai2Value, boxBean.Config.AIDI2_DefaultPosition).ToString();
txtAIResult3.Text = AIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString(); txtAIResult3.Text = ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtAIResult4.Text = AIManager.ConvertAI(ai4Value, boxBean.Config.AIDI4_DefaultPosition).ToString(); txtAIResult4.Text = ConvertAI(ai4Value, boxBean.Config.AIDI4_DefaultPosition).ToString();
//txtAIResult3.Text = AIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString(); //txtAIResult3.Text = AIManager.ConvertAI(ai3Value, boxBean.Config.AIDI3_DefaultPosition).ToString();
txtHeight.Text = boxBean.GetHeight().ToString(); txtHeight.Text = boxBean.GetHeight().ToString();
txtSize.Text = boxBean.GetSize().ToString(); txtSize.Text = boxBean.GetSize().ToString();
} }
public static double ConvertAI(double aiValue, double defaultValue)
{
double xishu = (double)StoreManager.Config.AI_ConvertPosition;
double result = Math.Round((aiValue - defaultValue) / xishu, 2);
return result;
}
private void btnReadAllDi_Click(object sender, EventArgs e) private void btnReadAllDi_Click(object sender, EventArgs e)
{ {
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
...@@ -272,14 +277,12 @@ namespace OnlineStore.ACSingleStore ...@@ -272,14 +277,12 @@ namespace OnlineStore.ACSingleStore
private void btnOpenDoor_Click(object sender, EventArgs e) private void btnOpenDoor_Click(object sender, EventArgs e)
{ {
LogUtil.info("点击按钮:" + btnOpenDoor.Text); LogUtil.info("点击按钮:" + btnOpenDoor.Text);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH); boxBean.OpenDoor(false);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
} }
private void btnCloseDoor_Click(object sender, EventArgs e) private void btnCloseDoor_Click(object sender, EventArgs e)
{ {
LogUtil.info("点击按钮:" + btnCloseDoor.Text); LogUtil.info("点击按钮:" + btnCloseDoor.Text);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH); boxBean.CloseDoor(false);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
} }
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
...@@ -289,12 +292,12 @@ namespace OnlineStore.ACSingleStore ...@@ -289,12 +292,12 @@ namespace OnlineStore.ACSingleStore
private void btnOpenAxisBreak_Click(object sender, EventArgs e) private void btnOpenAxisBreak_Click(object sender, EventArgs e)
{ {
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH); //IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
} }
private void btnCloseAxisBreak_Click(object sender, EventArgs e) private void btnCloseAxisBreak_Click(object sender, EventArgs e)
{ {
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW); //IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
this.btnOk = new System.Windows.Forms.Button(); this.btnOk = new System.Windows.Forms.Button();
this.rbtnEnglish = new System.Windows.Forms.RadioButton(); this.rbtnEnglish = new System.Windows.Forms.RadioButton();
this.rbtnChina = new System.Windows.Forms.RadioButton(); this.rbtnChina = new System.Windows.Forms.RadioButton();
this.rbtnJapanese = new System.Windows.Forms.RadioButton();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnCancel // btnCancel
...@@ -64,19 +65,19 @@ ...@@ -64,19 +65,19 @@
// //
this.rbtnEnglish.AutoSize = true; this.rbtnEnglish.AutoSize = true;
this.rbtnEnglish.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.rbtnEnglish.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnEnglish.Location = new System.Drawing.Point(198, 113); this.rbtnEnglish.Location = new System.Drawing.Point(198, 84);
this.rbtnEnglish.Name = "rbtnEnglish"; this.rbtnEnglish.Name = "rbtnEnglish";
this.rbtnEnglish.Size = new System.Drawing.Size(60, 25); this.rbtnEnglish.Size = new System.Drawing.Size(60, 25);
this.rbtnEnglish.TabIndex = 281; this.rbtnEnglish.TabIndex = 281;
this.rbtnEnglish.TabStop = true; this.rbtnEnglish.TabStop = true;
this.rbtnEnglish.Text = "英"; this.rbtnEnglish.Text = "英";
this.rbtnEnglish.UseVisualStyleBackColor = true; this.rbtnEnglish.UseVisualStyleBackColor = true;
// //
// rbtnChina // rbtnChina
// //
this.rbtnChina.AutoSize = true; this.rbtnChina.AutoSize = true;
this.rbtnChina.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.rbtnChina.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnChina.Location = new System.Drawing.Point(198, 59); this.rbtnChina.Location = new System.Drawing.Point(198, 39);
this.rbtnChina.Name = "rbtnChina"; this.rbtnChina.Name = "rbtnChina";
this.rbtnChina.Size = new System.Drawing.Size(60, 25); this.rbtnChina.Size = new System.Drawing.Size(60, 25);
this.rbtnChina.TabIndex = 280; this.rbtnChina.TabIndex = 280;
...@@ -84,6 +85,18 @@ ...@@ -84,6 +85,18 @@
this.rbtnChina.Text = "中文"; this.rbtnChina.Text = "中文";
this.rbtnChina.UseVisualStyleBackColor = true; this.rbtnChina.UseVisualStyleBackColor = true;
// //
// rbtnJapanese
//
this.rbtnJapanese.AutoSize = true;
this.rbtnJapanese.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnJapanese.Location = new System.Drawing.Point(198, 130);
this.rbtnJapanese.Name = "rbtnJapanese";
this.rbtnJapanese.Size = new System.Drawing.Size(60, 25);
this.rbtnJapanese.TabIndex = 281;
this.rbtnJapanese.TabStop = true;
this.rbtnJapanese.Text = "日语";
this.rbtnJapanese.UseVisualStyleBackColor = true;
//
// FrmLanguare // FrmLanguare
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -91,6 +104,7 @@ ...@@ -91,6 +104,7 @@
this.ClientSize = new System.Drawing.Size(456, 274); this.ClientSize = new System.Drawing.Size(456, 274);
this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOk); this.Controls.Add(this.btnOk);
this.Controls.Add(this.rbtnJapanese);
this.Controls.Add(this.rbtnEnglish); this.Controls.Add(this.rbtnEnglish);
this.Controls.Add(this.rbtnChina); this.Controls.Add(this.rbtnChina);
this.MaximizeBox = false; this.MaximizeBox = false;
...@@ -109,5 +123,6 @@ ...@@ -109,5 +123,6 @@
private System.Windows.Forms.Button btnOk; private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.RadioButton rbtnEnglish; private System.Windows.Forms.RadioButton rbtnEnglish;
private System.Windows.Forms.RadioButton rbtnChina; private System.Windows.Forms.RadioButton rbtnChina;
private System.Windows.Forms.RadioButton rbtnJapanese;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -27,6 +27,10 @@ namespace OnlineStore.ACSingleStore ...@@ -27,6 +27,10 @@ namespace OnlineStore.ACSingleStore
{ {
rbtnEnglish.Checked = true; rbtnEnglish.Checked = true;
} }
else if(ResourceCulture.CurrLanguage.Equals(ResourceCulture.Japanese))
{
rbtnJapanese.Checked = true;
}
else else
{ {
rbtnChina.Checked = true; rbtnChina.Checked = true;
...@@ -45,7 +49,10 @@ namespace OnlineStore.ACSingleStore ...@@ -45,7 +49,10 @@ namespace OnlineStore.ACSingleStore
{ {
str = ResourceCulture.English; str = ResourceCulture.English;
} }
else else if(rbtnJapanese.Checked)
{
str = ResourceCulture.Japanese;
}else
{ {
str = ResourceCulture.China; str = ResourceCulture.China;
} }
......
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
// //
// label1 // label1
// //
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(153, 61); this.label1.Location = new System.Drawing.Point(71, 61);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(126, 25); this.label1.Size = new System.Drawing.Size(306, 25);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "请输入密码:"; this.label1.Text = "请输入密码:";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
// btnNext // btnNext
// //
......
...@@ -15,7 +15,8 @@ using System.Reflection; ...@@ -15,7 +15,8 @@ using System.Reflection;
using log4net; using log4net;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using System.IO.Ports; using System.IO.Ports;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using CodeLibrary;
namespace OnlineStore.ACSingleStore namespace OnlineStore.ACSingleStore
{ {
...@@ -154,7 +155,7 @@ namespace OnlineStore.ACSingleStore ...@@ -154,7 +155,7 @@ namespace OnlineStore.ACSingleStore
notifyIcon1.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title); notifyIcon1.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
this.chbBuzzer.Checked = store.UseBuzzer; this.chbBuzzer.Checked = store.UseBuzzer;
axisMoveControl1.LoadData(store, store.moveAxisList.ToArray()); axisMoveControl1.LoadData(store);
chbIsDebug.Checked = store.IsDebug; chbIsDebug.Checked = store.IsDebug;
LoadOk = true; LoadOk = true;
HideForm(); HideForm();
...@@ -184,10 +185,30 @@ namespace OnlineStore.ACSingleStore ...@@ -184,10 +185,30 @@ namespace OnlineStore.ACSingleStore
chbIsDebug.Checked = false; chbIsDebug.Checked = false;
richTextBox1.Visible = false ; richTextBox1.Visible = false ;
tabControl1.TabPages.Remove(tabPage3); tabControl1.TabPages.Remove(tabPage3);
} }
// this.tabControl1.TabPages.Remove(tabPage3); // this.tabControl1.TabPages.Remove(tabPage3);
// groupCode.Visible = false; // groupCode.Visible = false;
AddForm(" IO调试 ", new FrmIOStatus(store));
}
private void AddForm<T>(string text, T form) where T : Form
{
TabPage lineTabPage = new TabPage(text);
Panel linePan = new Panel();
linePan.Dock = DockStyle.Fill;
linePan.AutoScroll = true;
form.FormBorderStyle = FormBorderStyle.None;
form.TopLevel = false;
lineTabPage.Controls.Add(form);
//linePan.Controls.Add(form);
form.Dock = DockStyle.Fill;
linePan.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
form.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
form.Show();
tabControl1.Controls.Add(lineTabPage);
} }
private string WaitStart = ResourceCulture.GetString("等待启动"); private string WaitStart = ResourceCulture.GetString("等待启动");
private string dooropen = ResourceCulture.GetString("前门未关"); private string dooropen = ResourceCulture.GetString("前门未关");
...@@ -299,10 +320,14 @@ namespace OnlineStore.ACSingleStore ...@@ -299,10 +320,14 @@ namespace OnlineStore.ACSingleStore
{ {
lblWarnMsg.Text = store.WarnObj.WarnMsg; lblWarnMsg.Text = store.WarnObj.WarnMsg;
} }
else else if (CurrLanguage.Equals(ResourceCulture.English))
{ {
lblWarnMsg.Text = store.WarnObj.WarnMsgEn; lblWarnMsg.Text = store.WarnObj.WarnMsgEn;
} }
else
{
lblWarnMsg.Text = store.WarnObj.WarnMsgJp;
}
if (store.Config.IsHasDoorLimit.Equals(1)) if (store.Config.IsHasDoorLimit.Equals(1))
{ {
...@@ -531,7 +556,7 @@ namespace OnlineStore.ACSingleStore ...@@ -531,7 +556,7 @@ namespace OnlineStore.ACSingleStore
private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed) private void AxisABSMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{ {
moveAxis.TargetPosition = targetPosition; moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed, targetSpeed*4, targetSpeed*4);
} }
private void btnUpDownP1_Click(object sender, EventArgs e) private void btnUpDownP1_Click(object sender, EventArgs e)
{ {
...@@ -805,14 +830,22 @@ namespace OnlineStore.ACSingleStore ...@@ -805,14 +830,22 @@ namespace OnlineStore.ACSingleStore
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e) private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
store.dlScanSocket.StartConnect(); //store.dlScanSocket.StartConnect();
store.GetCameraCode(); //store.GetCameraCode();
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
CodeLibrary.FrmCodeDecode frm = new CodeLibrary.FrmCodeDecode();
frm.ShowDialog();
frm.Dispose();
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
} }
private void 打开舱门ToolStripMenuItem_Click(object sender, EventArgs e) private void 打开舱门ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH); store.OpenDoor(false);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
} }
private void 料仓运转OFFToolStripMenuItem_Click(object sender, EventArgs e) private void 料仓运转OFFToolStripMenuItem_Click(object sender, EventArgs e)
...@@ -823,8 +856,7 @@ namespace OnlineStore.ACSingleStore ...@@ -823,8 +856,7 @@ namespace OnlineStore.ACSingleStore
private void 关闭仓门ToolStripMenuItem_Click(object sender, EventArgs e) private void 关闭仓门ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH); store.CloseDoor(false);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
} }
private void 回待机点ToolStripMenuItem_Click(object sender, EventArgs e) private void 回待机点ToolStripMenuItem_Click(object sender, EventArgs e)
...@@ -968,10 +1000,7 @@ namespace OnlineStore.ACSingleStore ...@@ -968,10 +1000,7 @@ namespace OnlineStore.ACSingleStore
IOManager.instance.CloseAllDO(); IOManager.instance.CloseAllDO();
StoreOpenStatus(false); StoreOpenStatus(false);
IOManager.instance.CloseAllConnection(); IOManager.instance.CloseAllConnection();
AIManager.Instance.CloseConnect();
ACServerManager.CloseAllPort(); ACServerManager.CloseAllPort();
//WCFControl.CloseWCF();
System.Environment.Exit(System.Environment.ExitCode); System.Environment.Exit(System.Environment.ExitCode);
} }
catch (Exception ex) catch (Exception ex)
...@@ -1049,8 +1078,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1049,8 +1078,7 @@ namespace OnlineStore.ACSingleStore
private void btnOpenDoor_Click(object sender, EventArgs e) private void btnOpenDoor_Click(object sender, EventArgs e)
{ {
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH); store.OpenDoor(false);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.LOW);
} }
private void btnOpenLed_Click(object sender, EventArgs e) private void btnOpenLed_Click(object sender, EventArgs e)
...@@ -1118,8 +1146,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1118,8 +1146,7 @@ namespace OnlineStore.ACSingleStore
private void btnCloseDoor_Click(object sender, EventArgs e) private void btnCloseDoor_Click(object sender, EventArgs e)
{ {
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW); store.CloseDoor(false);
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
} }
private void chbBuzzer_CheckedChanged(object sender, EventArgs e) private void chbBuzzer_CheckedChanged(object sender, EventArgs e)
...@@ -1146,16 +1173,14 @@ namespace OnlineStore.ACSingleStore ...@@ -1146,16 +1173,14 @@ namespace OnlineStore.ACSingleStore
private void btnUpdown_Click(object sender, EventArgs e) private void btnUpdown_Click(object sender, EventArgs e)
{ {
string PortName = store.Config.UpDown_Axis.DeviceName; string PortName = store.Config.UpDown_Axis.DeviceName;
int slvAddr = store.Config.UpDown_Axis.GetAxisValue(); short slvAddr = store.Config.UpDown_Axis.GetAxisValue();
string ioIP = "192.168.200.13";
int ioIndex = 0; int ioIndex = 0;
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal)) // if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
if (store.Config.StoreDIList.ContainsKey(IO_Type.TrayCheck_Fixture)) if (store.Config.StoreDIList.ContainsKey(IO_Type.TrayCheck_Fixture))
{ {
ioIP = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].IO_IP;
ioIndex = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].GetIOAddr(); ioIndex = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].GetIOAddr();
} }
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex); FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIndex, store.Config.UpDown_Axis.HomeHighSpeed, store.Config.UpDown_Axis.HomeLowSpeed, store.Config.UpDown_Axis.HomeAddSpeed);
frm.ShowDialog(); frm.ShowDialog();
LogUtil.logBox = this.richTextBox1; LogUtil.logBox = this.richTextBox1;
...@@ -1175,7 +1200,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1175,7 +1200,7 @@ namespace OnlineStore.ACSingleStore
{ {
if (store != null) if (store != null)
{ {
axisMoveControl1.LoadData(store, store.moveAxisList.ToArray()); axisMoveControl1.LoadData(store);
} }
string className = this.ClassName; string className = this.ClassName;
CurrLanguage = ResourceCulture.CurrLanguage; CurrLanguage = ResourceCulture.CurrLanguage;
......
...@@ -20,6 +20,7 @@ namespace OnlineStore ...@@ -20,6 +20,7 @@ namespace OnlineStore
public static bool ShowMsg = ConfigAppSettings.GetIntValue(Setting_Init.ShowLanguageMsg).Equals(1); public static bool ShowMsg = ConfigAppSettings.GetIntValue(Setting_Init.ShowLanguageMsg).Equals(1);
public static string China = "zh-CN"; public static string China = "zh-CN";
public static string English = "en-US"; public static string English = "en-US";
public static string Japanese = "ja-JP";
public static string CurrLanguage = "zh-CN"; public static string CurrLanguage = "zh-CN";
public static Dictionary<string, string> defaultMap = new Dictionary<string, string>(); public static Dictionary<string, string> defaultMap = new Dictionary<string, string>();
...@@ -47,6 +48,7 @@ namespace OnlineStore ...@@ -47,6 +48,7 @@ namespace OnlineStore
{ {
ResourceControl.GetChinaStringEvent += GetChinaString; ResourceControl.GetChinaStringEvent += GetChinaString;
ResourceControl.GetEnglishStringEvent += GetEnglishString; ResourceControl.GetEnglishStringEvent += GetEnglishString;
ResourceControl.GetJapaneseStringEvent += GetJapaneseString;
ResourceControl.GetStrEvent += GetString; ResourceControl.GetStrEvent += GetString;
ResourceControl.GetStringEvent += GetString; ResourceControl.GetStringEvent += GetString;
CSVResourceControl.GetStrEvent += GetString; CSVResourceControl.GetStrEvent += GetString;
...@@ -60,6 +62,7 @@ namespace OnlineStore ...@@ -60,6 +62,7 @@ namespace OnlineStore
ResourceMap = new Dictionary<string, Dictionary<string, string>>(); ResourceMap = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> ChinaMap = new Dictionary<string, string>(); Dictionary<string, string> ChinaMap = new Dictionary<string, string>();
Dictionary<string, string> EnglishMap = new Dictionary<string, string>(); Dictionary<string, string> EnglishMap = new Dictionary<string, string>();
Dictionary<string, string> JapaneseMap = new Dictionary<string, string>();
if (File.Exists(rPath)) if (File.Exists(rPath))
{ {
string[] lines = File.ReadAllLines(rPath); string[] lines = File.ReadAllLines(rPath);
...@@ -82,6 +85,11 @@ namespace OnlineStore ...@@ -82,6 +85,11 @@ namespace OnlineStore
{ {
eng = array[2].Replace('&', ',').Trim(); eng = array[2].Replace('&', ',').Trim();
} }
string jp = "";
if (array.Length >= 4)
{
jp = array[3].Replace('&', ',').Trim();
}
if (ChinaMap.ContainsKey(key)) if (ChinaMap.ContainsKey(key))
{ {
ChinaMap[key] = china; ChinaMap[key] = china;
...@@ -100,7 +108,18 @@ namespace OnlineStore ...@@ -100,7 +108,18 @@ namespace OnlineStore
{ {
EnglishMap.Add(key, eng); EnglishMap.Add(key, eng);
} }
// EnglishMap.Add(key, eng); }
if (String.IsNullOrEmpty(jp).Equals(false))
{
if (JapaneseMap.ContainsKey(key))
{
JapaneseMap[key] = jp;
}
else
{
JapaneseMap.Add(key, jp);
}
} }
} }
}catch(Exception ex) }catch(Exception ex)
...@@ -111,8 +130,9 @@ namespace OnlineStore ...@@ -111,8 +130,9 @@ namespace OnlineStore
} }
ResourceMap.Add(China, ChinaMap); ResourceMap.Add(China, ChinaMap);
ResourceMap.Add(English, EnglishMap); ResourceMap.Add(English, EnglishMap);
ResourceMap.Add(Japanese, JapaneseMap);
/*
Dictionary<string, string> rMap = LoadRMap(); Dictionary<string, string> rMap = LoadRMap();
bool isNeedUpE = false; bool isNeedUpE = false;
...@@ -161,6 +181,7 @@ namespace OnlineStore ...@@ -161,6 +181,7 @@ namespace OnlineStore
// } // }
//} //}
//FileUtil.SaveListToFile(allList.ToArray(), Application.StartupPath + "\\a.txt"); //FileUtil.SaveListToFile(allList.ToArray(), Application.StartupPath + "\\a.txt");
*/
} }
private static Dictionary<string,string> LoadRMap() private static Dictionary<string,string> LoadRMap()
...@@ -272,6 +293,11 @@ namespace OnlineStore ...@@ -272,6 +293,11 @@ namespace OnlineStore
string strCurLanguage = gets(English, id); string strCurLanguage = gets(English, id);
return String.Format(strCurLanguage, param); return String.Format(strCurLanguage, param);
} }
public static string GetJapaneseString(string id, params object[] param)
{
string strCurLanguage = gets(Japanese, id);
return String.Format(strCurLanguage, param);
}
private static string gets(string language,string id,string defaultStr="") private static string gets(string language,string id,string defaultStr="")
{ {
if (String.IsNullOrEmpty(defaultStr)) if (String.IsNullOrEmpty(defaultStr))
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
this.txtSpeed = new System.Windows.Forms.TextBox(); this.txtSpeed = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.txtFileName = new System.Windows.Forms.TextBox(); this.txtFileName = new System.Windows.Forms.TextBox();
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.btnAbsMove = new System.Windows.Forms.Button(); this.btnAbsMove = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
...@@ -62,14 +63,11 @@ ...@@ -62,14 +63,11 @@
this.txtPortName = new System.Windows.Forms.TextBox(); this.txtPortName = new System.Windows.Forms.TextBox();
this.btnServoOff = new System.Windows.Forms.Button(); this.btnServoOff = new System.Windows.Forms.Button();
this.txtIOIndex = new System.Windows.Forms.TextBox(); this.txtIOIndex = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.txtIoIp = new System.Windows.Forms.TextBox();
this.btnExit = new System.Windows.Forms.Button(); this.btnExit = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.ioStatusControl1 = new UserFromControl.IOStatusControl();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -258,6 +256,16 @@ ...@@ -258,6 +256,16 @@
this.txtFileName.TabIndex = 278; this.txtFileName.TabIndex = 278;
this.txtFileName.Text = "position.csv"; this.txtFileName.Text = "position.csv";
// //
// ioStatusControl1
//
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(38, 401);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(267, 69);
this.ioStatusControl1.TabIndex = 279;
//
// btnAbsMove // btnAbsMove
// //
this.btnAbsMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAbsMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -360,9 +368,7 @@ ...@@ -360,9 +368,7 @@
this.groupBox1.Controls.Add(this.txtPortName); this.groupBox1.Controls.Add(this.txtPortName);
this.groupBox1.Controls.Add(this.btnServoOff); this.groupBox1.Controls.Add(this.btnServoOff);
this.groupBox1.Controls.Add(this.txtIOIndex); this.groupBox1.Controls.Add(this.txtIOIndex);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtIoIp);
this.groupBox1.Location = new System.Drawing.Point(9, 13); this.groupBox1.Location = new System.Drawing.Point(9, 13);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(458, 173); this.groupBox1.Size = new System.Drawing.Size(458, 173);
...@@ -449,43 +455,23 @@ ...@@ -449,43 +455,23 @@
// //
this.txtIOIndex.Enabled = false; this.txtIOIndex.Enabled = false;
this.txtIOIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtIOIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIOIndex.Location = new System.Drawing.Point(136, 133); this.txtIOIndex.Location = new System.Drawing.Point(136, 93);
this.txtIOIndex.MaxLength = 30; this.txtIOIndex.MaxLength = 30;
this.txtIOIndex.Name = "txtIOIndex"; this.txtIOIndex.Name = "txtIOIndex";
this.txtIOIndex.Size = new System.Drawing.Size(164, 26); this.txtIOIndex.Size = new System.Drawing.Size(164, 26);
this.txtIOIndex.TabIndex = 275; this.txtIOIndex.TabIndex = 275;
this.txtIOIndex.Text = "1"; this.txtIOIndex.Text = "1";
// //
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(8, 100);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(122, 20);
this.label1.TabIndex = 272;
this.label1.Text = "IO模块IP:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2 // label2
// //
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(8, 136); this.label2.Location = new System.Drawing.Point(8, 96);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(122, 20); this.label2.Size = new System.Drawing.Size(122, 20);
this.label2.TabIndex = 274; this.label2.TabIndex = 274;
this.label2.Text = "检测信号地址:"; this.label2.Text = "检测信号地址:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// txtIoIp
//
this.txtIoIp.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIoIp.Location = new System.Drawing.Point(136, 97);
this.txtIoIp.MaxLength = 30;
this.txtIoIp.Name = "txtIoIp";
this.txtIoIp.Size = new System.Drawing.Size(164, 26);
this.txtIoIp.TabIndex = 273;
this.txtIoIp.Text = "192.168.201.11";
//
// btnExit // btnExit
// //
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
...@@ -525,16 +511,6 @@ ...@@ -525,16 +511,6 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// ioStatusControl1
//
this.ioStatusControl1.IOName = "检测信号";
this.ioStatusControl1.IOValue = 0;
this.ioStatusControl1.isCanClick = false;
this.ioStatusControl1.Location = new System.Drawing.Point(38, 401);
this.ioStatusControl1.Name = "ioStatusControl1";
this.ioStatusControl1.Size = new System.Drawing.Size(267, 69);
this.ioStatusControl1.TabIndex = 279;
//
// FrmPositionTool // FrmPositionTool
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
...@@ -581,8 +557,6 @@ ...@@ -581,8 +557,6 @@
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TextBox txtIOIndex; private System.Windows.Forms.TextBox txtIOIndex;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtIoIp;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtPortName; private System.Windows.Forms.TextBox txtPortName;
private System.Windows.Forms.TextBox txtFileName; private System.Windows.Forms.TextBox txtFileName;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
......
...@@ -21,18 +21,23 @@ namespace OnlineStore.ACSingleStore ...@@ -21,18 +21,23 @@ namespace OnlineStore.ACSingleStore
{ {
private string LogName = ResourceCulture.GetString("升降轴位置调试:"); private string LogName = ResourceCulture.GetString("升降轴位置调试:");
private string PortName = ""; private string PortName = "";
private int SlvAddr = 0; private short SlvAddr = 0;
private string IoIp = "";
private int IoIndex = 0; private int IoIndex = 0;
public string Axis_Brake = IO_Type.Axis_Brake; private int ptpAcc = 0;
private int ptpDec = 0;
private int homespeed = 0;
//public string Axis_Brake = IO_Type.Axis_Brake;
private System.Timers.Timer toolTimer = new System.Timers.Timer(); private System.Timers.Timer toolTimer = new System.Timers.Timer();
public FrmPositionTool(string protName, int slvAddr,string ioIp, int ioIndex) public FrmPositionTool(string protName, short slvAddr, int ioIndex, int ptpAcc, int ptpDec,int homespeed)
{ {
InitializeComponent(); InitializeComponent();
this.PortName = protName; this.PortName = protName;
this.SlvAddr = slvAddr; this.SlvAddr = slvAddr;
this.IoIp = ioIp;
this.IoIndex = ioIndex; this.IoIndex = ioIndex;
this.ptpAcc = ptpAcc;
this.ptpDec = ptpDec;
this.homespeed = homespeed;
toolTimer.Enabled = false; toolTimer.Enabled = false;
toolTimer.Interval = 50; toolTimer.Interval = 50;
...@@ -45,8 +50,8 @@ namespace OnlineStore.ACSingleStore ...@@ -45,8 +50,8 @@ namespace OnlineStore.ACSingleStore
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
ACServerManager.IsShowMsg = false; ACServerManager.IsShowMsg = false;
//LogUtil.logBox = null;
//LogUtil.logBox = this.richTextBox1; LogUtil.logBox = this.richTextBox1;
//ACServerManager.richeBox = this.richTextBox1; //ACServerManager.richeBox = this.richTextBox1;
...@@ -54,7 +59,7 @@ namespace OnlineStore.ACSingleStore ...@@ -54,7 +59,7 @@ namespace OnlineStore.ACSingleStore
txtPortName.Text = PortName; txtPortName.Text = PortName;
txtAddr.Text = SlvAddr.ToString(); txtAddr.Text = SlvAddr.ToString();
txtIOIndex.Text = IoIndex.ToString(); txtIOIndex.Text = IoIndex.ToString();
txtIoIp.Text = IoIp.ToString(); //txtIoIp.Text = IoIp.ToString();
if (IOManager.instance == null) if (IOManager.instance == null)
{ {
...@@ -94,7 +99,7 @@ namespace OnlineStore.ACSingleStore ...@@ -94,7 +99,7 @@ namespace OnlineStore.ACSingleStore
private void btnServoOn_Click(object sender, EventArgs e) private void btnServoOn_Click(object sender, EventArgs e)
{ {
this.PortName = txtPortName.Text; this.PortName = txtPortName.Text;
this.SlvAddr = FormUtil.GetIntValue(txtAddr); this.SlvAddr = FormUtil.GetShortValue(txtAddr);
bool result = ACServerManager.OpenPort(PortName); bool result = ACServerManager.OpenPort(PortName);
if (!result) if (!result)
{ {
...@@ -107,14 +112,6 @@ namespace OnlineStore.ACSingleStore ...@@ -107,14 +112,6 @@ namespace OnlineStore.ACSingleStore
Thread.Sleep(100); Thread.Sleep(100);
ACServerManager.AlarmClear(PortName, SlvAddr); ACServerManager.AlarmClear(PortName, SlvAddr);
ACServerManager.ServoOn(PortName, SlvAddr); ACServerManager.ServoOn(PortName, SlvAddr);
try
{
IOManager.IOMove(Axis_Brake, IO_VALUE.HIGH);
}catch(Exception ex)
{
}
} }
...@@ -124,14 +121,6 @@ namespace OnlineStore.ACSingleStore ...@@ -124,14 +121,6 @@ namespace OnlineStore.ACSingleStore
// toolTimer.Stop(); // toolTimer.Stop();
ACServerManager.SuddenStop(PortName, SlvAddr); ACServerManager.SuddenStop(PortName, SlvAddr);
Thread.Sleep(100); Thread.Sleep(100);
try
{
IOManager.IOMove(Axis_Brake, IO_VALUE.LOW);
}
catch (Exception ex)
{
}
ACServerManager.ServoOff(PortName, SlvAddr); ACServerManager.ServoOff(PortName, SlvAddr);
formStatus(false); formStatus(false);
} }
...@@ -160,12 +149,13 @@ namespace OnlineStore.ACSingleStore ...@@ -160,12 +149,13 @@ namespace OnlineStore.ACSingleStore
private void btnRelMove_Click(object sender, EventArgs e) private void btnRelMove_Click(object sender, EventArgs e)
{ {
int position = Convert.ToInt32(txtPosition.Text); int position = Convert.ToInt32(txtPosition.Text);
ACServerManager.RelMove(PortName, SlvAddr, position); int speed = Convert.ToInt32(txtSpeed.Text);
ACServerManager.RelMove(PortName, SlvAddr, position, speed, speed*4, speed * 4);
} }
private void btnHomeMove_Click(object sender, EventArgs e) private void btnHomeMove_Click(object sender, EventArgs e)
{ {
int speed = Convert.ToInt32(txtSpeed.Text); int speed = Convert.ToInt32(txtSpeed.Text);
ACServerManager.HomeMove(PortName, SlvAddr, speed); ACServerManager.HomeMove(PortName, SlvAddr, ptpAcc, ptpDec,homespeed);
} }
private void btnSpeedMove_Click(object sender, EventArgs e) private void btnSpeedMove_Click(object sender, EventArgs e)
{ {
...@@ -223,7 +213,7 @@ namespace OnlineStore.ACSingleStore ...@@ -223,7 +213,7 @@ namespace OnlineStore.ACSingleStore
PositionList = new List<int>(); PositionList = new List<int>();
LogUtil.info(LogName + "伺服开始运动,速度【" + speed + "】位置【" + position + "】启动定时器 "); LogUtil.info(LogName + "伺服开始运动,速度【" + speed + "】位置【" + position + "】启动定时器 ");
formMoveStatus(false); formMoveStatus(false);
ACServerManager.AbsMove(PortName, SlvAddr, position, speed); ACServerManager.AbsMove(PortName, SlvAddr, position, speed, speed * 4, speed * 4);
toolTimer.Start(); toolTimer.Start();
} }
private int P3Offset = 0; private int P3Offset = 0;
...@@ -249,7 +239,7 @@ namespace OnlineStore.ACSingleStore ...@@ -249,7 +239,7 @@ namespace OnlineStore.ACSingleStore
private IO_VALUE GetSingleValue() private IO_VALUE GetSingleValue()
{ {
return IOManager.instance.GetDIValue(IoIp, 0, (ushort)IoIndex); return IOManager.instance.GetDIValue(PortName, 0, (ushort)IoIndex);
} }
private int TargetPostion = 0; private int TargetPostion = 0;
private bool isInProcesss = false; private bool isInProcesss = false;
......
...@@ -117,4 +117,7 @@ ...@@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file

namespace OnlineStore.ACSingleStore.useControl
{
partial class uc_AxisDebug
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// uc_AxisDebug
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "uc_AxisDebug";
this.Size = new System.Drawing.Size(966, 594);
this.ResumeLayout(false);
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.ACSingleStore.useControl
{
public partial class uc_AxisDebug : UserControl
{
public uc_AxisDebug()
{
InitializeComponent();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace> <RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName> <AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath> <HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json"> <Reference Include="Newtonsoft.Json">
<HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath>
......
...@@ -39,14 +39,14 @@ namespace OnlineStore.Common ...@@ -39,14 +39,14 @@ namespace OnlineStore.Common
public static string Store_ConfigPath = "Store_ConfigPath"; public static string Store_ConfigPath = "Store_ConfigPath";
public static string Store_Position_Config = "Store_Position_Config"; public static string Store_Position_Config = "Store_Position_Config";
///// <summary> /// <summary>
///// 摄像机名称,多个中间使用#分割 /// 摄像机名称,多个中间使用#分割
///// </summary> /// </summary>
//public static string CameraName = "CameraName"; public static string CameraName = "CameraName";
///// <summary> /// <summary>
///// 需要识别的二维码类型,多个中间使用#分割 /// 需要识别的二维码类型,多个中间使用#分割
///// </summary> /// </summary>
//public static string CodeType = "CodeType"; public static string CodeType = "CodeType";
/// <summary> /// <summary>
/// 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值) /// 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)
...@@ -57,11 +57,11 @@ namespace OnlineStore.Common ...@@ -57,11 +57,11 @@ namespace OnlineStore.Common
/// </summary> /// </summary>
public static string StopBlowValue = "StopBlowValue"; public static string StopBlowValue = "StopBlowValue";
///// <summary> /// <summary>
///// 配置文件路径 Data Matrix ECC 200.dcm /// 配置文件路径 Data Matrix ECC 200.dcm
///// </summary> /// </summary>
//public static string CodeParamPath = "CodeParamPath"; public static string CodeParamPath = "CodeParamPath";
/// <summary> /// <summary>
/// 进出轴最大待机点,需要小于3000 /// 进出轴最大待机点,需要小于3000
/// </summary> /// </summary>
...@@ -84,7 +84,6 @@ namespace OnlineStore.Common ...@@ -84,7 +84,6 @@ namespace OnlineStore.Common
/// </summary> /// </summary>
public static string DeCodeType = "DeCodeType"; public static string DeCodeType = "DeCodeType";
public static string DefaultPWD = "DefaultPWD"; public static string DefaultPWD = "DefaultPWD";
public static string UseAIOBOX = "UseAIOBOX";
/// <summary> /// <summary>
/// 是否打开蜂鸣器 /// 是否打开蜂鸣器
/// </summary> /// </summary>
...@@ -104,5 +103,6 @@ namespace OnlineStore.Common ...@@ -104,5 +103,6 @@ namespace OnlineStore.Common
public static string Default_Language= "Default_Language"; public static string Default_Language= "Default_Language";
public static string MaxScanCount = "MaxScanCount"; public static string MaxScanCount = "MaxScanCount";
public static string QRCodeCount = "MaxScanCount";
} }
} }
...@@ -65,6 +65,7 @@ namespace OnlineStore.Common ...@@ -65,6 +65,7 @@ namespace OnlineStore.Common
public string msg { get; set; } public string msg { get; set; }
public string msgEn { get; set; } public string msgEn { get; set; }
public string msgJp { get; set; }
/// <summary> /// <summary>
/// 包含的多个 BOX 的状态信息 /// 包含的多个 BOX 的状态信息
/// </summary> /// </summary>
...@@ -100,6 +101,7 @@ namespace OnlineStore.Common ...@@ -100,6 +101,7 @@ namespace OnlineStore.Common
public string msg { get; set; } public string msg { get; set; }
public string msgEn { get; set; } public string msgEn { get; set; }
public string msgJp { get; set; }
/// <summary> /// <summary>
/// 温度 /// 温度
/// </summary> /// </summary>
...@@ -123,7 +125,7 @@ namespace OnlineStore.Common ...@@ -123,7 +125,7 @@ namespace OnlineStore.Common
public class AlarmInfo public class AlarmInfo
{ {
public AlarmInfo(int StoreID, int aType, string alarmDetial, string WarnMsg,string alarmMsgEn, int inoutStatus) public AlarmInfo(int StoreID, int aType, string alarmDetial, string WarnMsg,string alarmMsgEn, string alarmMsgJp, int inoutStatus)
{ {
// TODO: Complete member initialization // TODO: Complete member initialization
this.boxId = StoreID; this.boxId = StoreID;
...@@ -132,6 +134,7 @@ namespace OnlineStore.Common ...@@ -132,6 +134,7 @@ namespace OnlineStore.Common
this.alarmMsg = WarnMsg; this.alarmMsg = WarnMsg;
this.inOutStatus = inoutStatus; this.inOutStatus = inoutStatus;
this.alarmMsgEn = alarmMsgEn; this.alarmMsgEn = alarmMsgEn;
this.alarmMsgJp = alarmMsgJp;
} }
public AlarmInfo() public AlarmInfo()
...@@ -163,6 +166,7 @@ namespace OnlineStore.Common ...@@ -163,6 +166,7 @@ namespace OnlineStore.Common
public string alarmDetail { get; set; } public string alarmDetail { get; set; }
public string alarmMsgEn { get; set; } public string alarmMsgEn { get; set; }
public string alarmMsgJp { get; set; }
/// <summary> /// <summary>
/// 报警消息 /// 报警消息
/// </summary> /// </summary>
......
...@@ -39,9 +39,18 @@ ...@@ -39,9 +39,18 @@
<Reference Include="Asa.IOModule.AIOBOX"> <Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath> <HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="CodeLibrary">
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HuichuanLibrary">
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath> <HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -58,19 +67,15 @@ ...@@ -58,19 +67,15 @@
<ItemGroup> <ItemGroup>
<Compile Include="acSingleStore\AC_SA_BoxBean.cs" /> <Compile Include="acSingleStore\AC_SA_BoxBean.cs" />
<Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" /> <Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" />
<Compile Include="acSingleStore\DoorControl.cs" />
<Compile Include="acSingleStore\StoreManager.cs" /> <Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="dataLogic\DLScanSocket.cs" /> <Compile Include="halcon\CodeManager.cs" />
<Compile Include="IO\AIManager.cs" /> <Compile Include="IO\HCIOManager.cs" />
<Compile Include="IO\AIOBOX\AIOAIManager.cs" />
<Compile Include="IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="IO\IOManager.cs" /> <Compile Include="IO\IOManager.cs" />
<Compile Include="IO\KangNaiDe\AITcpClient.cs" />
<Compile Include="IO\KangNaiDe\KNDAIManager.cs" />
<Compile Include="IO\KangNaiDe\KNDManager.cs" />
<Compile Include="IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="PanasonicServo\ACCMDManager.cs" /> <Compile Include="PanasonicServo\ACCMDManager.cs" />
<Compile Include="PanasonicServo\ACServerManager.cs" /> <Compile Include="PanasonicServo\ACServerManager.cs" />
<Compile Include="PanasonicServo\ACServerManager_Partial.cs" /> <Compile Include="PanasonicServo\ACServerManager_Partial.cs" />
<Compile Include="PanasonicServo\HC\HCAxisManager.cs" />
<Compile Include="ResourceControl.cs" /> <Compile Include="ResourceControl.cs" />
<Compile Include="store\LineMoveP.cs" /> <Compile Include="store\LineMoveP.cs" />
<Compile Include="store\LineAlarm.cs"> <Compile Include="store\LineAlarm.cs">
...@@ -111,6 +116,9 @@ ...@@ -111,6 +116,9 @@
<None Include="StoreConfig\AC\linePositions.csv"> <None Include="StoreConfig\AC\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="StoreConfig\AC\StoreConfig - 复制.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\AC\StoreConfig.csv"> <None Include="StoreConfig\AC\StoreConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
...@@ -17,11 +17,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,11 +17,11 @@ namespace OnlineStore.DeviceLibrary
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1); bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1);
if (isAIOBox) if (isAIOBox)
{ {
Instance = new AIOAIManager(); //Instance = new AIOAIManager();
} }
else else
{ {
Instance = new KNDAIManager(); //Instance = new KNDAIManager();
} }
} }
public static double ConvertAI(double aiValue, double defaultValue) public static double ConvertAI(double aiValue, double defaultValue)
......
using HuichuanLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary.IO
{
public class HCIOManager : IOManager
{
public void CloseAllConnection()
{
HCBoardManager.CloseCard();
}
public void CloseAllDO()
{
HCBoardManager.CloseAllDO();
}
public bool ConnectionIOList(List<string> dIODeviceNameList)
{
if (!HCBoardManager.CardInitOk())
{
HCBoardManager.InitConfig("", "", "HCBOARD");
if (!HCBoardManager.OpenCard())
{
LogUtil.info("板卡第一次打开失败,关闭后重新打开");
HCBoardManager.CloseCard();
Thread.Sleep(2000);
return HCBoardManager.OpenCard();
}
}
return true;
}
public IO_VALUE GetDIValue(string deviceName, byte slaveID, ushort index)
{
short v = HCBoardManager.GetBitDI((short)index);
return (IO_VALUE)v;
}
public IO_VALUE GetDOValue(string deviceName, byte slaveID, ushort index)
{
short v = HCBoardManager.GetBitDO((short)index);
return (IO_VALUE)v;
}
public IO_VALUE GetIOValue(ConfigIO configIO)
{
short index =(short) configIO.GetIOAddr();
if (configIO.ProType=="DI")
return (IO_VALUE)HCBoardManager.GetBitDI(index);
else
return (IO_VALUE)HCBoardManager.GetBitDO(index);
}
public void ReadAllDI(string deviceName, byte slaveId)
{
}
public void ReadAllDO(string deviceName, byte slaveId)
{
}
public short GetAdVal(short index)
{
short v = HCBoardManager.GetAdVal(index);
return v;
}
public void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value, int time)
{
try
{
short v = (short)value;
HCBoardManager.SetBitDO((short)index, v);
short targetV = 0;
if (v.Equals((short)0))
{
targetV = 1;
}
//写入之后,等待指定间隔后回写
System.Timers.Timer mytimer = new System.Timers.Timer(time);
mytimer.Elapsed += (o1, e1) =>
{
try
{
HCBoardManager.SetBitDO((short)index, targetV);
}
catch (Exception ex)
{
LogUtil.error("**********定时回写入 出错:" + ex.StackTrace);
}
};
mytimer.AutoReset = false;
mytimer.Enabled = true;
}
catch (Exception ex)
{
LogUtil.error("AIO WriteSingleDO [" + index + "] 出错:" + ex.ToString());
}
}
public void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value)
{
short v = (short)value;
HCBoardManager.SetBitDO((short)index, v);
}
}
}
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.IO;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -10,59 +11,68 @@ namespace OnlineStore.DeviceLibrary ...@@ -10,59 +11,68 @@ namespace OnlineStore.DeviceLibrary
{ {
public abstract class IOManager public abstract class IOManager
{ {
public static IOManager instance = null; public static HCIOManager instance = null;
public abstract void ConnectionIOList(List<string> dIODeviceNameList);
#region KNDIO #region KNDIO
public static void IOMove(string ioType, IO_VALUE ioValue, int subType=0)
public static void IOMove(string ioType, IO_VALUE ioValue)
{ {
if (StoreManager.Config.StoreDOList.ContainsKey(ioType)) if (string.IsNullOrEmpty(ioType))
{
return;
}
ConfigIO configIo = GetDO(ioType, subType);
if (configIo != null)
{ {
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType];
//DateTime time = DateTime.Now;
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
//TimeSpan span = DateTime.Now - time; Thread.Sleep(10);
//if (span.TotalMilliseconds > 100)
//{
// LogUtil.error("IOMove [" + ioType + "] ["+ioValue+"]耗时" + span.TotalMilliseconds);
//}
Thread.Sleep(60);
} }
else else
{ {
LogUtil.error("没有DO=" + ioType); LogUtil.error("未找到DO,[" + ioType + "][" + subType + "]");
} }
} }
public static IO_VALUE IOValue(string ioType) public static IO_VALUE IOValue(string ioType, int subType=0)
{ {
IO_VALUE ioValue = IO_VALUE.LOW; if (string.IsNullOrEmpty(ioType))
if (StoreManager.Config.StoreDIList.ContainsKey(ioType))
{ {
ConfigIO configIo = StoreManager.Config.StoreDIList[ioType]; return IO_VALUE.None;
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
//UpdateDoValue(ioType, ioValue);
} }
else if (StoreManager.Config.StoreDOList.ContainsKey(ioType)) IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDI(ioType, subType);
if (configIo == null)
{ {
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType]; configIo = GetDO(ioType, subType);
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); }
if (configIo != null)
{
if (configIo.ProType.Equals(ConfigItemType.DI))
{
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
else
{
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
} }
else else
{ {
LogUtil.error("没有DO=" + ioType); LogUtil.error("未找到IO[" + ioType + "][" + subType + "]");
} }
return ioValue; return ioValue;
} }
public static IO_VALUE DOValue(string ioType) public static IO_VALUE DOValue(string ioType, int subType=0)
{ {
IO_VALUE ioValue = IO_VALUE.LOW; if (string.IsNullOrEmpty(ioType))
if (StoreManager.Config.StoreDOList.ContainsKey(ioType)) {
return IO_VALUE.None;
}
IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDO(ioType, subType);
if (configIo != null)
{ {
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType];
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
} }
else else
...@@ -71,40 +81,106 @@ namespace OnlineStore.DeviceLibrary ...@@ -71,40 +81,106 @@ namespace OnlineStore.DeviceLibrary
} }
return ioValue; return ioValue;
} }
#endregion public static IO_VALUE DIValue(string ioType, int subType=0)
public static void Init()
{ {
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1); if (string.IsNullOrEmpty(ioType))
if (isAIOBox) {
return IO_VALUE.None;
}
IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDI(ioType, subType);
if (configIo != null)
{ {
instance = new AIOBOXManager(); ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
} }
else else
{ {
instance = new KNDManager(); LogUtil.error("未找到 DI [" + ioType + "][" + subType + "]");
} }
return ioValue;
} }
public abstract void ReadAllDI(string deviceName, byte slaveId); internal static ConfigIO GetIO(string ioType, int subType=0)
{
public abstract void ReadAllDO(string deviceName, byte slaveId); ConfigIO configIo = GetDI(ioType, subType);
if (configIo == null)
public abstract void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value, int time); {
configIo = GetDO(ioType, subType);
public abstract void WriteSingleDO(string deviceName, byte slaveId, ushort index, IO_VALUE value); }
return configIo;
}
public abstract IO_VALUE GetDIValue(string deviceName, byte slaveID, ushort v); internal static ConfigIO GetDI(string ioType, int subType=0)
{
ConfigIO configIo = null;
public abstract IO_VALUE GetDOValue(string deviceName, byte slaveID, ushort v); if (subType <= 0)
{
if (StoreManager.Config.StoreDIList.ContainsKey(ioType))
public abstract IO_VALUE GetIOValue(ConfigIO configIO); {
return StoreManager.Config.StoreDIList[ioType];
public abstract void CloseAllDO(); }
}
else
{
if (StoreManager.allConfigMap.ContainsKey(subType))
{
if (StoreManager.allConfigMap[subType].StoreDIList.ContainsKey(ioType))
{
return StoreManager.allConfigMap[subType].StoreDIList[ioType];
}
}
}
if (configIo == null && subType > 0)
{
if (StoreManager.Config.StoreDIList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDIList[ioType];
}
}
return configIo;
}
internal static ConfigIO GetDO(string ioType, int subType=0)
{
ConfigIO configIo = null;
if (subType <= 0)
{
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDOList[ioType];
}
}
else
{
if (StoreManager.allConfigMap.ContainsKey(subType))
{
if (StoreManager.allConfigMap[subType].StoreDOList.ContainsKey(ioType))
{
return StoreManager.allConfigMap[subType].StoreDOList[ioType];
}
}
}
if (configIo == null && subType > 0)
{
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
{
return StoreManager.Config.StoreDOList[ioType];
}
}
return configIo;
}
public abstract void CloseAllConnection(); public static short GetADIOValue(short ioAddr)
{
return instance.GetAdVal(ioAddr);
}
#endregion
public static void Init()
{
bool UseHCBoard = true;// ConfigAppSettings.GetIntValue(Setting_Init.UseHCBoard).Equals(1);
if (UseHCBoard)
{
instance = new HCIOManager();
}
}
} }
} }
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public abstract class AxisManager
{
public bool IsShowMsg = false;
public static AxisManager instance;
public static bool UseHCBoard = true;
public static void Init()
{
// UseHCBoard = ConfigAppSettings.GetIntValue(Setting_Init.UseHCBoard).Equals(1);
if (UseHCBoard)
{
instance = new HCAxisManager();
}
else
{
//instance = new ACServerManager();
}
}
#region 485通信方法
/// <summary>
/// 废弃return true
/// </summary>
/// <param name="portName"></param>
/// <returns></returns>
public abstract bool OpenPort(string portName);
/// <summary>
/// 松下专用
/// </summary>
/// <param name="portName"></param>
public abstract void ColsePort(string portName);
/// <summary>
/// 松下专用
/// </summary>
public abstract void CloseAllPort();
/// <summary>
/// 松下专用
/// </summary>
public abstract void ClearSpeed();
/// <summary>
/// 松下专用
/// </summary>
/// <param name="portName"></param>
/// <param name="slvAddr"></param>
/// <param name="targetSpeed"></param>
/// <param name="addSpeed"></param>
/// <param name="delSpeed"></param>
public abstract void InitSlvAddr(string portName, short slvAddr, int targetSpeed, int addSpeed, int delSpeed);
public abstract bool IsServeoOn(string portName, short slvAddr);
#endregion
public abstract bool OpenCard();
public abstract bool CloseCard();
public abstract bool IsHomeMoveEnd(string portName, short slvAddr);
public abstract bool AbsMoveIsEnd(string portName, short axisNo, int targetPosition, int canErrorCount, out bool countError);
public abstract void ServoOn(string portName, short slvAddr);
public abstract void ServoOff(string portName, short slvAddr);
public abstract void RelMove(string portName, short slvAddr, int position, int targetSpeed , int ptpAcc , int ptpDec );
public abstract void HomeMove(string portName, short slvAddr, int highVel, int lowVel, int acc);
public abstract void SpeedMove(string portName, short slvAddr, int speed);
public abstract void SuddenStop(string portName, short slvAddr);
public abstract bool isInPosition(string portName, short slvAddr, int PPosition, int canErrorCount, bool isLog = false);
public abstract void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed , int ptpAcc , int ptpDec );
public abstract void AlarmClear(string portName, short slvAddr);
public abstract int GetTargetPosition(string portName, short slvAddr);
public abstract int GetActualtPosition(string portName, short slvAddr);
public abstract int GetAlarmStatus(string portName, short slvAddr);
public abstract int GetBusyStatus(string portName, short slvAddr);
public abstract int GetHomeEndStatus(string portName, short slvAddr);
public abstract int GetHomeSingle(string portName, short slvAddr);
/// <summary>
/// 负极限
/// </summary>
public abstract int GetLimitNegativeSingle(string portName, short slvAddr);
/// <summary>
/// 正极限
/// </summary>
public abstract int GetLimitPositiveSingle(string portName, short slvAddr);
public abstract short GetErrorCode(string portName, short slvAddr);
public static void SuddenStop(ConfigMoveAxis axis)
{
if (instance.GetBusyStatus(axis.DeviceName, axis.GetAxisValue()).Equals(1))
{
instance.SuddenStop(axis.DeviceName, axis.GetAxisValue());
}
}
}
}
using HuichuanLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class HCAxisManager
{
public bool OpenCard()
{
return HCBoardManager.OpenCard();
}
public bool CloseCard()
{
return HCBoardManager.CloseCard();
}
public void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed, int ptpAcc, int ptpDec)
{
HCLogUtil.LOGGER.Info($"slvAddr={slvAddr},targetPosition={targetPosition},targetSpeed={targetSpeed},ptpAcc={ptpAcc},ptpDec={ptpDec}");
HCBoardManager.AbsMove((short)slvAddr, targetPosition, targetSpeed, ptpAcc, ptpDec);
}
public void AlarmClear(string portName, short slvAddr)
{
HCBoardManager.ClearAxisSts((short)slvAddr);
}
public bool OpenPort(string portName)
{
return true;
}
public void ClearSpeed()
{
}
public void CloseAllPort()
{
}
public void ColsePort(string portName)
{
}
public void InitSlvAddr(string portName, short slvAddr, int targetSpeed, int addSpeed, int delSpeed)
{
}
public int GetActualtPosition(string portName, short slvAddr)
{
return (int)HCBoardManager.GetAxisCurrPos(slvAddr);
}
public int GetAlarmStatus(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ALM;
}
public int GetBusyStatus(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.BUSY;
}
public int GetHomeEndStatus(string portName, short slvAddr)
{
return (int)HCBoardManager.GetHomeStatus(slvAddr);
}
public int GetHomeSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ALM;
}
public int GetLimitNegativeSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.NEL;
}
public int GetLimitPositiveSingle(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.PEL;
}
public int GetTargetPosition(string portName, short slvAddr)
{
return (int)HCBoardManager.GetAxisPrfPos(slvAddr);
}
public void HomeMove(string portName, short slvAddr, int highVel, int lowVel, int acc)
{
HCBoardManager.StartHomeMove(slvAddr, (uint)highVel, (uint)lowVel, (uint)acc);
}
public bool IsHomeMoveEnd(string portName, short slvAddr)
{
return HCBoardManager.HomeingIsEnd(slvAddr);
}
public bool isInPosition(string portName, short slvAddr, int PPosition, int canErrorCount, bool isLog = false)
{
return HCBoardManager.IsInPosition(slvAddr, PPosition, canErrorCount);
}
public void RelMove(string portName, short slvAddr, int position, int targetSpeed, int ptpAcc, int ptpDec)
{
HCBoardManager.RelMove(slvAddr, position, targetSpeed, ptpAcc, ptpDec);
}
public bool IsServeoOn(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
return axisS.ServoOn.Equals(1);
}
public void ServoOff(string portName, short slvAddr)
{
HCBoardManager.ServoOff(slvAddr);
}
public void ServoOn(string portName, short slvAddr)
{
HCBoardManager.ServoOn(slvAddr);
}
public void SpeedMove(string portName, short slvAddr, int speed)
{
HCBoardManager.SpeedMove(slvAddr, speed);
}
public void SuddenStop(string portName, short slvAddr)
{
HCBoardManager.AxisStop(slvAddr);
}
public bool AbsMoveIsEnd(string portName, short axisNo, int targetPosition, int canErrorCount, out bool countError)
{
countError = false;
bool isOk = HCBoardManager.MoveIsEnd(axisNo);
if (isOk)
{
if (HCBoardManager.IsInPosition(axisNo, targetPosition, canErrorCount))
{
return true;
}
else
{
countError = true;
}
}
return false;
}
public short GetErrorCode(string portName, short slvAddr)
{
AxisSts axisS = HCBoardManager.GetAxisSts(slvAddr);
HCLogUtil.LOGGER.Info(axisS.ToStr());
return HCBoardManager.GetAxErrCode(slvAddr);
}
}
}
...@@ -20,6 +20,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,6 +20,8 @@ namespace OnlineStore.DeviceLibrary
public delegate string GetEnglishStringDelegate(string id, params object[] param); public delegate string GetEnglishStringDelegate(string id, params object[] param);
public static event GetEnglishStringDelegate GetEnglishStringEvent; public static event GetEnglishStringDelegate GetEnglishStringEvent;
public delegate string GetJapaneseStringDelegate(string id, params object[] param);
public static event GetJapaneseStringDelegate GetJapaneseStringEvent;
public static string GetMsgStr(string value) public static string GetMsgStr(string value)
{ {
...@@ -49,7 +51,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -49,7 +51,10 @@ namespace OnlineStore.DeviceLibrary
public static string GetEnglishString(string id, params object[] param) public static string GetEnglishString(string id, params object[] param)
{ {
return GetEnglishStringEvent?.Invoke(id, param); return GetEnglishStringEvent?.Invoke(id, param);
}
public static string GetJapaneseString(string id, params object[] param)
{
return GetJapaneseStringEvent?.Invoke(id, param);
} }
/// <summary> /// <summary>
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.21#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.21#16,,,,,,,
,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,192.168.200.21,0,急停,X01,X01,0,
DI,复位,Reset_BTN,1,192.168.200.21,0,复位,X02,X02,0,
DI,启动,AutoRun_Signal,2,192.168.200.21,0,启动,X03,X03,0,
DI,气压检测,Airpressure_Check,3,192.168.200.21,0,气压检测,X04,X04,0,
DI,料盘检测1(进料口),TrayCheck_Door,4,192.168.200.21,0,料盘检测1(进料口),X05,X05,0,
DI,料盘检测2(料叉),TrayCheck_Fixture,5,192.168.200.21,0,料盘检测2(料叉),X06,X06,0,
DI,进料口门上升端,Door_Up,6,192.168.200.21,0,进料口门上升端,X07,X07,0,
DI,进料口门下降端,Door_Down,7,192.168.200.21,0,进料口门下降端,X08,X08,0,
DI,安全光栅,SafetyLightCurtains,8,192.168.200.21,0,安全光栅,X09,X09,0,
DI,前门限位,Door_Limit,9,192.168.200.21,0,前门限位,X10,X10,0,
DI,左侧门限位,Door_LeftLimit,10,192.168.200.21,0,左侧门限位,X11,X11,0,
DI,右侧门限位,Door_RightLimit,11,192.168.200.21,0,右侧门限位,X12,X12,0,
,,,12,192.168.200.21,0,,X13,X13,0,
,,,13,192.168.200.21,0,,X14,X14,0,
,,,14,192.168.200.21,0,,X15,X15,0,
,,,15,192.168.200.21,0,,X16,X16,0,
DO,自动指示灯,AutoRun_HddLed,0,192.168.200.21,0,自动指示灯,Y01,Y01,0,
DO,故障指示灯,Alarm_HddLed,1,192.168.200.21,0,故障指示灯,Y02,Y02,0,
DO,待机指示灯,RunSign_HddLed,2,192.168.200.21,0,待机指示灯,Y03,Y03,0,
DO,故障蜂鸣器,Alarm_Buzzer,3,192.168.200.21,0,故障蜂鸣器,Y04,Y04,0,
DO,吹气SOL ON,StartOrStopBlow,4,192.168.200.21,0,吹气SOL ON,Y05,Y05,0,
DO,料仓运转ON,Run_Signal,5,192.168.200.21,0,料仓运转ON,Y06,Y06,0,
DO,轴2刹车电源ON,Axis_Brake,6,192.168.200.21,0,轴2刹车电源ON,Y07,Y07,0,
DO,进料口门上升SOL,Door_Up,7,192.168.200.21,0,进料口门上升SOL,Y08,Y08,0,
DO,进料口门下降SOL,Door_Down,8,192.168.200.21,0,进料口门下降SOL,Y09,Y09,0,
DO,相机照明开,Camera_Led,9,192.168.200.21,0,相机照明开,Y10,Y10,0,
DO,设备照明开,Device_Led,10,192.168.200.21,0,设备照明开,Y11,Y11,0,
,,,11,192.168.200.21,0,,Y12,Y12,0,
,,,12,192.168.200.21,0,,Y13,Y13,0,
,,,13,192.168.200.21,0,,Y14,Y14,0,
,,,14,192.168.200.21,0,,Y15,Y15,0,
,,,15,192.168.200.21,0,,Y16,Y16,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM2,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM2,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM2,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM2,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,380000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,394000,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,394000,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,380000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,266793,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,0,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,2000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,1,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,温湿度传感器地址,TemperateServer_Port,9001,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,2000,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,2000,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,2000,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,400,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,400,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,100,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,300,,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,300,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,100,,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,300,,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,300,,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,800,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,800,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,800,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,300,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,800,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,300,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,300,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,300,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,300,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,300,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,300,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,800,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,800,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,800,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,100,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最大值,MiddleAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,1000,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,, ,
PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.22,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,18031,,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,18064,,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,2500,,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,2500,,,,,,,
,,,,,,,,, ,
PRO,模拟信号1的地址,AIDI1_Addr,0,,,,,,,
PRO,模拟信号2的地址,AIDI2_Addr,1,,,,,,,
PRO,模拟信号3的地址(13寸高度),AIDI3_Addr,2,,,,,,,
PRO,模拟信号4的地址(15寸高度),AIDI4_Addr,3,,,,,,,
,,,,,,,,, ,
PRO,模拟转换系数,AI_ConvertPosition,150,,,,,,,
,,,,,,,,, ,
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,0,,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32,,,,,,,
,,,,,,,,, ,
PRO,扫码枪IP,Scanner_Ip,192.168.201.21,,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,,
,,,,,,,,, ,
PRO,大盘宽度(13寸或15寸),Big_TrayWidth,13,,,,,,,
...@@ -89,6 +89,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,6 +89,8 @@ namespace OnlineStore.DeviceLibrary
#region 出入库结果验证 #region 出入库结果验证
private void InOutBackToP1(int InOut_P1) private void InOutBackToP1(int InOut_P1)
{ {
ACAxisMove(Config.InOut_Axis, InOut_P1, Config.InOutAxis_P1_Speed);
/*
//判断是否在P1,如果是,不需要运行 //判断是否在P1,如果是,不需要运行
int outCount = ACServerManager.GetActualtPosition(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); int outCount = ACServerManager.GetActualtPosition(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
int errorCount = Math.Abs(outCount - InOut_P1); int errorCount = Math.Abs(outCount - InOut_P1);
...@@ -104,6 +106,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -104,6 +106,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis, IO_VALUE.HIGH));
} }
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH)); //StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
*/
} }
private void CheckWait() private void CheckWait()
...@@ -156,7 +159,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -156,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
{ {
timeOutMs = 650000; timeOutMs = 650000;
} }
/*
//如果是门开关信号,增加重写功能 //如果是门开关信号,增加重写功能
if (!wait.IsEnd && span.TotalSeconds < StoreMove.TimeOutSeconds) if (!wait.IsEnd && span.TotalSeconds < StoreMove.TimeOutSeconds)
{ {
...@@ -185,7 +188,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -185,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.HIGH);
} }
} }
} }*/
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs) if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs)
{ {
ConfigIO io = Config.getWaitIO(wait.IoType); ConfigIO io = Config.getWaitIO(wait.IoType);
...@@ -333,7 +336,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -333,7 +336,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1, 打开仓门"); InStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1, 打开仓门");
StoreMove.NextMoveStep(StoreMoveStep.SI_02_OpenDoor); StoreMove.NextMoveStep(StoreMoveStep.SI_02_OpenDoor);
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(200)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(200));
OpenDoorAndWait(); OpenDoor();
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
private void SI_05_DeviceToDoor() private void SI_05_DeviceToDoor()
...@@ -438,8 +441,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -438,8 +441,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
//关闭仓门 //关闭仓门
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH); CloseDoor(false);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
} }
//else //else
//{ //{
...@@ -455,8 +457,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -455,8 +457,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
//关闭仓门 //关闭仓门
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH); CloseDoor(false);
IOManager.IOMove(IO_Type.Door_Up, IO_VALUE.LOW);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_09_MoveToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_09_MoveToBag)
{ {
...@@ -513,7 +514,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -513,7 +514,7 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait(); CloseDoor();
} }
else else
{ {
...@@ -529,7 +530,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -529,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait(); CloseDoor();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_15_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_15_GoBack)
{ {
...@@ -800,7 +801,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -800,7 +801,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 "); OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoorAndWait(); OpenDoor();
} }
private void OutStoreEnd() private void OutStoreEnd()
{ {
...@@ -817,7 +818,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -817,7 +818,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack); StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack);
OutStoreLog("出库:SO_14 升降轴返回,轴2至P1(待机点) ,关闭仓门,更改状态为出库完成"); OutStoreLog("出库:SO_14 升降轴返回,轴2至P1(待机点) ,关闭仓门,更改状态为出库完成");
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait(); CloseDoor();
//改为出库完成 //改为出库完成
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
......
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
partial class AC_SA_BoxBean
{
Thread DoorRunMonitorThread;
void InitDoorRunMonitor() {
DoorRunMonitorThread = new Thread(new ThreadStart(DoorRunMonitor));
DoorRunMonitorThread.Start();
GC.KeepAlive(DoorRunMonitorThread);
LogUtil.info(StoreName + "出料门运行监控开始");
}
bool DoorRunMonitorEnable = false;
public void OpenDoor(bool needwait = true)
{
if (DoorIsOpen())
return;
IOManager.IOMove(IO_Type.Door_Moto_Rev, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.HIGH);
//if (IOManager.DOValue(IO_Type.StartOrStopBlow).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.HIGH);
// openBlow = true;
//}
DoorRunMonitorEnable = true;
if (needwait)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.HIGH));
}
}
/// <summary>
/// 记录是否是因为开门打开的吹气
/// </summary>
bool openBlow = false;
public void CloseDoor(bool needwait = true)
{
if (DoorIsClose())
return;
IOManager.IOMove(IO_Type.Door_Moto_Rev, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.HIGH);
//if (openBlow) {
// IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
// openBlow = false;
//}
DoorRunMonitorEnable = true;
if (needwait)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Down, IO_VALUE.HIGH));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Door_Up, IO_VALUE.LOW));
}
}
private bool DoorIsClose()
{
//&& IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.LOW)
if (IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.HIGH))
{
//IOManager.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
return true;
}
return false;
}
private bool DoorIsOpen()
{
//IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.LOW) &&
if (IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
void DoorRunMonitor()
{
while (true) {
if (DoorRunMonitorEnable)
{
Thread.Sleep(30);
}
else {
//检测到门在运行立刻开始监控
if (IOManager.DOValue(IO_Type.Door_Moto_Run).Equals(IO_VALUE.HIGH)) {
DoorRunMonitorEnable = true;
continue;
}
Thread.Sleep(300);
continue;
}
if (IOManager.IOValue(IO_Type.Motor_Error).Equals(IO_VALUE.HIGH)) {
SetWarnMsg(ResourceControl.WaitSingleTimeOut);
continue;
}
//开门检测
if (IOManager.DOValue(IO_Type.Door_Moto_Run).Equals(IO_VALUE.HIGH)
&& IOManager.DOValue(IO_Type.Door_Moto_Rev).Equals(IO_VALUE.LOW)
&& IOManager.IOValue(IO_Type.Door_Up).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.LOW);
DoorRunMonitorEnable = false;
continue;
}
//关门检测
if (IOManager.DOValue(IO_Type.Door_Moto_Run).Equals(IO_VALUE.HIGH)
&& IOManager.DOValue(IO_Type.Door_Moto_Rev).Equals(IO_VALUE.HIGH)
&& IOManager.IOValue(IO_Type.Door_Down).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Door_Moto_Run, IO_VALUE.LOW);
DoorRunMonitorEnable = false;
continue;
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
...@@ -21,6 +21,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -21,6 +21,7 @@ namespace OnlineStore.DeviceLibrary
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static AC_SA_BoxBean Store = null; public static AC_SA_BoxBean Store = null;
public static AC_SA_Config Config = null; public static AC_SA_Config Config = null;
public static Dictionary<int, StoreConfig> allConfigMap = null;
private static bool isInit = false; private static bool isInit = false;
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals(""); public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public StoreManager() public StoreManager()
......
...@@ -195,6 +195,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -195,6 +195,7 @@ namespace OnlineStore.DeviceLibrary
// WarnMsg = String.Format(msg, param); // WarnMsg = String.Format(msg, param);
WarnObj.WarnMsg = ResourceControl.GetChinaString(code, param); WarnObj.WarnMsg = ResourceControl.GetChinaString(code, param);
WarnObj.WarnMsgEn = ResourceControl.GetEnglishString(code, param); WarnObj.WarnMsgEn = ResourceControl.GetEnglishString(code, param);
WarnObj.WarnMsgJp = ResourceControl.GetJapaneseString(code, param);
WarnObj.MsgCode = code; WarnObj.MsgCode = code;
WarnObj.MsgParam = param; WarnObj.MsgParam = param;
} }
...@@ -218,6 +219,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -218,6 +219,7 @@ namespace OnlineStore.DeviceLibrary
public WarnInfo() public WarnInfo()
{ {
WarnMsgEn = ""; WarnMsgEn = "";
WarnMsgJp = "";
MsgCode = ""; MsgCode = "";
WarnMsg = ""; WarnMsg = "";
MsgParam = null; MsgParam = null;
...@@ -226,6 +228,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -226,6 +228,7 @@ namespace OnlineStore.DeviceLibrary
public string MsgCode { set; get; } public string MsgCode { set; get; }
public string WarnMsg { set; get; } public string WarnMsg { set; get; }
public string WarnMsgEn {set;get;} public string WarnMsgEn {set;get;}
public string WarnMsgJp { set; get; }
public string[] MsgParam { set; get; } public string[] MsgParam { set; get; }
} }
} }
...@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
} }
isInPro = false; isInPro = false;
} }
protected void SaveAlarmInfo(StoreAlarmType alarmType, string alarmDetial, string alarmMsg,string alarmMsgEn, StoreMoveType storeMoveType) protected void SaveAlarmInfo(StoreAlarmType alarmType, string alarmDetial, string alarmMsg,string alarmMsgEn, string alarmMsgJp, StoreMoveType storeMoveType)
{ {
alarmMsg = alarmMsg.Replace(StoreName, ""); alarmMsg = alarmMsg.Replace(StoreName, "");
int inoutStatus = 0; int inoutStatus = 0;
...@@ -184,7 +184,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -184,7 +184,7 @@ namespace OnlineStore.DeviceLibrary
break; break;
default: break; default: break;
} }
alarmInfo = new AlarmInfo(StoreID, aType, alarmDetial, alarmMsg,alarmMsgEn, inoutStatus); alarmInfo = new AlarmInfo(StoreID, aType, alarmDetial, alarmMsg,alarmMsgEn, alarmMsgJp, inoutStatus);
} }
/// <summary> /// <summary>
...@@ -228,7 +228,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -228,7 +228,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, moveAxis.DisplayStr + "speed[" + moveAxis.TargetSpeed + "]开始原点返回"); LogUtil.info(LOGGER, moveAxis.DisplayStr + "speed[" + moveAxis.TargetSpeed + "]开始原点返回");
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true)); StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true));
AddAxisMoveTime(moveAxis); AddAxisMoveTime(moveAxis);
ACServerManager.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed); ACServerManager.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed);
} }
/// <summary> /// <summary>
...@@ -239,7 +239,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -239,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed)); StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed));
moveAxis.TargetPosition = targetPosition; moveAxis.TargetPosition = targetPosition;
AddAxisMoveTime(moveAxis); AddAxisMoveTime(moveAxis);
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition,targetSpeed, targetSpeed*4, targetSpeed * 4);
} }
/// <summary> /// <summary>
...@@ -275,7 +275,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,7 +275,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error(LOGGER, moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount + LogUtil.error(LOGGER, moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount +
"],误差过大,重新开始运动,剩余[" + StoreMove.CanWhileCount + "]次"); "],误差过大,重新开始运动,剩余[" + StoreMove.CanWhileCount + "]次");
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed); ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed, targetSpeed * 4, targetSpeed * 4);
StoreMove.CanWhileCount--; StoreMove.CanWhileCount--;
} }
else else
...@@ -306,7 +306,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -306,7 +306,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error(LOGGER, moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],重新回原点,剩余[" + StoreMove.CanWhileCount + "]次"); LogUtil.error(LOGGER, moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],重新回原点,剩余[" + StoreMove.CanWhileCount + "]次");
//LogUtil.error(LOGGER, StoreName + moveAxis.DisplayStr + "重新回原点"); //LogUtil.error(LOGGER, StoreName + moveAxis.DisplayStr + "重新回原点");
ACServerManager.HomeMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed); ACServerManager.HomeMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed);
StoreMove.CanWhileCount--; StoreMove.CanWhileCount--;
} }
else else
......
...@@ -176,6 +176,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -176,6 +176,8 @@ namespace OnlineStore.DeviceLibrary
/// 关闭门,旋转轴到P1,升降轴到P1 /// 关闭门,旋转轴到P1,升降轴到P1
/// </summary> /// </summary>
BOX_M_H_TOP1_OtherAxisToP1 = 032, BOX_M_H_TOP1_OtherAxisToP1 = 032,
BOX_H_InOutBack_wait = 033,
BOX_H_OtherAxisBack_wait = 034,
#endregion #endregion
...@@ -183,7 +185,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
///料仓出库,,定位气缸下降 ///料仓出库,,定位气缸下降
/// </summary> /// </summary>
SO_01_LocationCylinderDown=101, SO_01_LocationCylinderDown =101,
/// <summary> /// <summary>
///料仓出库:叉子先运动到P1 ///料仓出库:叉子先运动到P1
/// </summary> /// </summary>
...@@ -779,6 +781,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -779,6 +781,7 @@ namespace OnlineStore.DeviceLibrary
/// 在线双层料仓:回原点:原点开关点亮,原点开关点亮,旋回端开关点亮,,转盘停止 ,电缸停止, 清理电钢和转盘的位置信息 /// 在线双层料仓:回原点:原点开关点亮,原点开关点亮,旋回端开关点亮,,转盘停止 ,电缸停止, 清理电钢和转盘的位置信息
/// </summary> /// </summary>
DB_H_04_ClearPosition = 20304, DB_H_04_ClearPosition = 20304,
} }
public enum StoreAlarmType public enum StoreAlarmType
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace> <RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName> <AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath> <HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -93,12 +93,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -93,12 +93,12 @@ namespace OnlineStore.LoadCSVLibrary
/// 加速度 /// 加速度
/// </summary> /// </summary>
//[CSVAttribute("加速时间")] //[CSVAttribute("加速时间")]
public short AddSpeed { get; set; } public int AddSpeed { get; set; }
/// <summary> /// <summary>
/// 减速度 /// 减速度
/// </summary> /// </summary>
//[CSVAttribute("减速时间")] //[CSVAttribute("减速时间")]
public short DelSpeed { get; set; } public int DelSpeed { get; set; }
public int HomeLowSpeed { get; set; } public int HomeLowSpeed { get; set; }
public int HomeHighSpeed { get; set; } public int HomeHighSpeed { get; set; }
......
...@@ -29,97 +29,108 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -29,97 +29,108 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// DI 急停 SuddenStop_BTN X01 /// DI 急停 SuddenStop_BTN X00
/// </summary> /// </summary>
public static string SuddenStop_BTN = "SuddenStop_BTN"; public static string SuddenStop_BTN = "SuddenStop_BTN";
/// <summary> /// <summary>
/// DI 复位 Reset_BTN X02 /// DI 复位 Reset_BTN X01
/// </summary> /// </summary>
public static string Reset_BTN = "Reset_BTN"; public static string Reset_BTN = "Reset_BTN";
/// <summary> /// <summary>
///DI 自动 AutoRun_Signal X03 ///DI 自动 AutoRun_Signal X02
/// </summary> /// </summary>
public static string AutoRun_Signal = "AutoRun_Signal"; public static string AutoRun_Signal = "AutoRun_Signal";
/// <summary> /// <summary>
///DI 气压检测 Airpressure_Check X04 ///DI 气压检测 Airpressure_Check X03
/// </summary> /// </summary>
public static string Airpressure_Check = "Airpressure_Check"; public static string Airpressure_Check = "Airpressure_Check";
/// <summary> /// <summary>
/// DI 料盘检测1(进料口) TrayCheck_Door X05 /// DI 料盘检测1(进料口) TrayCheck_Door X04
/// </summary> /// </summary>
public static string TrayCheck_Door = "TrayCheck_Door"; public static string TrayCheck_Door = "TrayCheck_Door";
/// <summary> /// <summary>
/// DI 料盘检测2(料叉) TrayCheck_Fixture X06 /// DI 料盘检测2(料叉) TrayCheck_Fixture X05
/// </summary> /// </summary>
public static string TrayCheck_Fixture = "TrayCheck_Fixture"; public static string TrayCheck_Fixture = "TrayCheck_Fixture";
/// <summary> /// <summary>
/// DI 进料口门上升端 Door_Up X07 /// DI 进料口门上升端 Door_Up X06
/// </summary> /// </summary>
public static string Door_Up = "Door_Up"; public static string Door_Up = "Door_Up";
/// <summary> /// <summary>
/// DI 进料口门下降端 Door_Down X08 /// DI 进料口门下降端 Door_Down X07
/// </summary> /// </summary>
public static string Door_Down = "Door_Down"; public static string Door_Down = "Door_Down";
/// <summary> /// <summary>
/// DI 安全光栅 SafetyLightCurtains X09 /// DI 安全光栅 SafetyLightCurtains X08
/// </summary> /// </summary>
public static string SafetyLightCurtains = "SafetyLightCurtains"; public static string SafetyLightCurtains = "SafetyLightCurtains";
/// <summary> /// <summary>
/// DI 前门限位 Door_Limit X10 /// DI 前门限位 Door_Limit X09
/// </summary> /// </summary>
public static string Door_Limit = "Door_Limit"; public static string Door_Limit = "Door_Limit";
/// <summary> /// <summary>
/// DI 左侧门限位 Door_LeftLimit X11 /// DI 左侧门限位 Door_LeftLimit X10
/// </summary> /// </summary>
public static string Door_LeftLimit = "Door_LeftLimit"; public static string Door_LeftLimit = "Door_LeftLimit";
/// <summary> /// <summary>
/// DI 右侧门限位 Door_RightLimit X12 /// DI 右侧门限位 Door_RightLimit X11
/// </summary> /// </summary>
public static string Door_RightLimit = "Door_RightLimit"; public static string Door_RightLimit = "Door_RightLimit";
/// <summary>
/// DI 激光对点检测 Door_RightLimit X12
/// </summary>
public static string Laser_detection = "Laser_detection";
/// <summary>
/// DI 进料口电机异常 Door_RightLimit X13
/// </summary>
public static string Motor_Error = "Motor_Error";
/// <summary> /// <summary>
/// DO 自动指示灯 AutoRun_HddLed Y01 /// DO 自动指示灯 AutoRun_HddLed Y00
/// </summary> /// </summary>
public static string AutoRun_HddLed = "AutoRun_HddLed"; public static string AutoRun_HddLed = "AutoRun_HddLed";
/// <summary> /// <summary>
///DO 故障指示灯 Alarm_HddLed Y02 ///DO 故障指示灯 Alarm_HddLed Y01
/// </summary> /// </summary>
public static string Alarm_HddLed = "Alarm_HddLed"; public static string Alarm_HddLed = "Alarm_HddLed";
/// <summary> /// <summary>
/// DO 待机指示灯 RunSign_HddLed Y03 /// DO 待机指示灯 RunSign_HddLed Y02
/// </summary> /// </summary>
public static string RunSign_HddLed = "RunSign_HddLed"; public static string RunSign_HddLed = "RunSign_HddLed";
/// <summary> /// <summary>
/// DO 故障蜂鸣器 Alarm_Buzzer Y04 /// DO 故障蜂鸣器 Alarm_Buzzer Y03
/// </summary> /// </summary>
public static string Alarm_Buzzer = "Alarm_Buzzer"; public static string Alarm_Buzzer = "Alarm_Buzzer";
/// <summary> /// <summary>
/// DO 吹气SOL ON StartOrStopBlow Y05 /// DO 吹气SOL ON StartOrStopBlow Y06
/// </summary> /// </summary>
public static string StartOrStopBlow = "StartOrStopBlow"; public static string StartOrStopBlow = "StartOrStopBlow";
/// <summary> /// <summary>
/// DO 料仓运转ON Run_Signal Y06 /// DO 相机照明开 Camera_Led Y05
/// </summary> /// </summary>
public static string Run_Signal = "Run_Signal"; public static string Camera_Led = "Camera_Led";
/// <summary> /// <summary>
/// DO 轴2刹车电源ON Axis_Brake Y07 /// DO 设备照明开 Device_Led Y04
/// </summary> /// </summary>
public static string Axis_Brake = "Axis_Brake"; public static string Device_Led = "Device_Led";
/// <summary> /// <summary>
/// DO 相机照明开 Camera_Led Y10 /// DO 进料口门运转 Door_Moto_Run Y07
/// </summary> /// </summary>
public static string Camera_Led = "Camera_Led"; public static string Door_Moto_Run = "Door_Moto_Run";
/// <summary> /// <summary>
/// DO 设备照明开 Device_Led Y11 /// DO 进料口门反转关门 Door_Moto_Rev Y08
/// </summary> /// </summary>
public static string Device_Led = "Device_Led"; public static string Door_Moto_Rev = "Door_Moto_Rev";
} }
public enum IO_VALUE public enum IO_VALUE
{ {
None = -1,
/// <summary> /// <summary>
/// 低位 /// 低位
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!