Commit 5d42698f 张东亮

存储机构-更新合并

2 个父辈 c4361089 4518c7b1
正在显示 29 个修改的文件 包含 1162 行增加96 行删除
......@@ -5,6 +5,7 @@ AXIS,0,取料升降轴,TakeAxis_Updown,12,HC,,300000,200000,200000,800,10000,10000,10
AXIS,0,取料旋转轴,TakeAxis_Middle,13,HC,,800000,1500000,1500000,1200,8000,30000,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,是否使用夹爪(1=使用夹爪,0=用吸盘),UseClampJaw,1,,,,,,,,,,,,
PRO,0,A侧扫码的相机名称(多个用#分隔),CameraNameList_A,GigE:MV-CE200-10GC (00E78064929),,,,,,,,,,,,
PRO,0,B侧扫码的相机名称(多个用#分隔),CameraNameList_B,GigE:MV-CE200-10GC (00E78064929),,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
......@@ -36,22 +37,22 @@ PRO,0,取料升降轴_NG料区放料高点,Updown_P8_NGH,107,,,,,,,,,,,,
PRO,0,取料升降轴_NG料区放料低点,Updown_P9_NGL,108,,,,,,,,,,,,
PRO,0,取料升降轴_B上暂存区放料高点,Updown_P10_BUpperH,109,,,,,,,,,,,,
PRO,0,取料升降轴_B上暂存区放料低点,Updown_P11_BUpperL,110,,,,,,,,,,,,
PRO,0,取料升降轴_B下暂存区取料高点,Updown_P12_AUnderH,111,,,,,,,,,,,,
PRO,0,取料升降轴_B下暂存区取料低点,Updown_P13_AUnderL,112,,,,,,,,,,,,
PRO,0,取料升降轴_B下暂存区取料高点,Updown_P12_BUnderH,111,,,,,,,,,,,,
PRO,0,取料升降轴_B下暂存区取料低点,Updown_P13_BUnderL,112,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料旋转轴_P1速度,Updown_P1_Speed,108,,,,,,,,,,,,
PRO,1,取料旋转轴_P2速度,Updown_P2_Speed,109,,,,,,,,,,,,
PRO,2,取料旋转轴_P3速度,Updown_P3_Speed,110,,,,,,,,,,,,
PRO,3,取料旋转轴_P4速度,Updown_P4_Speed,111,,,,,,,,,,,,
PRO,4,取料旋转轴_P5速度,Updown_P5_Speed,112,,,,,,,,,,,,
PRO,5,取料旋转轴_P6速度,Updown_P6_Speed,113,,,,,,,,,,,,
PRO,6,取料旋转轴_P7速度,Updown_P7_Speed,114,,,,,,,,,,,,
PRO,7,取料旋转轴_P8速度,Updown_P8_Speed,115,,,,,,,,,,,,
PRO,8,取料旋转轴_P9速度,Updown_P9_Speed,116,,,,,,,,,,,,
PRO,9,取料旋转轴_P10速度,Updown_P10_Speed,117,,,,,,,,,,,,
PRO,10,取料旋转轴_P11速度,Updown_P11_Speed,118,,,,,,,,,,,,
PRO,11,取料旋转轴_P12速度,Updown_P12_Speed,119,,,,,,,,,,,,
PRO,12,取料旋转轴_P13速度,Updown_P13_Speed,120,,,,,,,,,,,,
PRO,0,取料升降轴_P1速度,Updown_P1_Speed,108,,,,,,,,,,,,
PRO,1,取料升降轴_P2速度,Updown_P2_Speed,109,,,,,,,,,,,,
PRO,2,取料升降轴_P3速度,Updown_P3_Speed,110,,,,,,,,,,,,
PRO,3,取料升降轴_P4速度,Updown_P4_Speed,111,,,,,,,,,,,,
PRO,4,取料升降轴_P5速度,Updown_P5_Speed,112,,,,,,,,,,,,
PRO,5,取料升降轴_P6速度,Updown_P6_Speed,113,,,,,,,,,,,,
PRO,6,取料升降轴_P7速度,Updown_P7_Speed,114,,,,,,,,,,,,
PRO,7,取料升降轴_P8速度,Updown_P8_Speed,115,,,,,,,,,,,,
PRO,8,取料升降轴_P9速度,Updown_P9_Speed,116,,,,,,,,,,,,
PRO,9,取料升降轴_P10速度,Updown_P10_Speed,117,,,,,,,,,,,,
PRO,10,取料升降轴_P11速度,Updown_P11_Speed,118,,,,,,,,,,,,
PRO,11,取料升降轴_P12速度,Updown_P12_Speed,119,,,,,,,,,,,,
PRO,12,取料升降轴_P13速度,Updown_P13_Speed,120,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料旋转轴_待机点,Middle_P1,100,,,,,,,,,,,,
PRO,0,取料旋转轴_A料口取料点,Middle_P2_ATake,101,,,,,,,,,,,,
......
......@@ -41,9 +41,9 @@ DI,2,料屉第14层检测信号,Row_Check_14,29,HC,X29,,,,,,,,,,,,
DI,2,料屉第15层检测信号,Row_Check_15,30,HC,X30,,,,,,,,,,,,
,,,,31,HC,X31,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DI,1,左前门门禁信号(存储机构),LeftDoor_Limit,32,HC,X32,,,,,,,,,,,,
DI,1,右前门门禁信号(存储机构),RightDoor_Limit,33,HC,X33,,,,,,,,,,,,
DI,1,后门门禁信号(存储机构),BackDoor_Limit,34,HC,X34,,,,,,,,,,,,
DI,2,左前门门禁信号(存储机构),LeftDoor_Limit,32,HC,X32,,,,,,,,,,,,
DI,2,右前门门禁信号(存储机构),RightDoor_Limit,33,HC,X33,,,,,,,,,,,,
DI,2,后门门禁信号(存储机构),BackDoor_Limit,34,HC,X34,,,,,,,,,,,,
DI,1,急停(取料机构),SuddenStop_BTN,35,HC,X35,,,,,,,,,,,,
DI,1,复位(取料机构),Reset_BTN,36,HC,X36,,,,,,,,,,,,
DI,1,光栅信号,SafetyRasterSignal,37,HC,X37,,,,,,,,,,,,
......
......@@ -331,7 +331,14 @@ namespace OnlineStore.DeviceLibrary
}
}
public bool IsBatchMove()
{
if (axisCheckTimer != null && axisCheckTimer.Enabled)
{
return true;
}
return false;
}
#endregion
}
}
......
......@@ -97,6 +97,11 @@ namespace OnlineStore.DeviceLibrary
{
Camera._cam.CloseAll();
}
public static List<string> CameraScan(string cameraName, string deviceName, bool findRightCodeBreak = false, int timeOut = 1500)
{
List<string> nameList = new List<string>() { cameraName };
return CameraScan(nameList, deviceName, findRightCodeBreak, timeOut);
}
private static int ScanCount = 0;
private static int codeCount = ConfigAppSettings.GetIntValue(Setting_Init.CodeCount);
[HandleProcessCorruptedStateExceptions]
......
......@@ -144,26 +144,20 @@ namespace OnlineStore.DeviceLibrary
return false;
}
public static void SaveMoveEquipConfig(BoxEquip_Config config)
public static void SaveBoxConfig(BoxEquip_Config config)
{
try
{
//位置配置到文件中
string appPath = Application.StartupPath;
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box);
string configBase = appPath + moveEquipConfig;
string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + config.Id.ToString().PadLeft(2, '0') + ".csv");
string boxConfig = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box);
allConfigMap[config.Id] = config;
if (!File.Exists(configStr))
{
LogUtil.info("复制配置文件【" + configBase + "】->【" + configStr + "】");
File.Copy(configBase, configStr);
}
bool result = CSVConfigReader.SaveConfig(configStr, config, typeof(BoxEquip_Config));
bool result = CSVConfigReader.SaveConfig(boxConfig, config, typeof(BoxEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configStr);
LogUtil.error("保存配置文件失败:" + boxConfig);
}
}
catch (Exception ex)
......@@ -177,15 +171,13 @@ namespace OnlineStore.DeviceLibrary
{
//位置配置到文件中
string appPath = Application.StartupPath;
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input);
int id = config.Id - 100;
string configStr = appPath + moveEquipConfig.Replace(".csv", "_" + id + ".csv");
string configFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configStr, config, typeof(InputEquip_Config));
bool result = CSVConfigReader.SaveConfig(configFile, config, typeof(InputEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configStr);
LogUtil.error("保存配置文件失败:" + configFile);
}
}
catch (Exception ex)
......
......@@ -398,6 +398,12 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(Name + logInfo);
}
protected void MoveLog(string msg)
{
string posId = (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PosInfo != null) ? " [" + MoveInfo.MoveParam.PosInfo.PosId + "][" + MoveInfo.MoveParam.PosInfo.barcode + "]" : "";
LogUtil.info(Name + " " + posId + msg);
}
/// <summary>
/// 阻塞等待IO信号,等到返回true,未等到返回false
/// </summary>c
......
......@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary
MoveP = null;
}
public InOutParam(InOutPosInfo inoutInfo, BoxMovePosition linePosition = null)
public InOutParam(InOutPosInfo inoutInfo, LineMoveP linePosition = null)
{
ACStoreP = null; ;
MoveP = linePosition;
......@@ -48,8 +48,14 @@ namespace OnlineStore.DeviceLibrary
}
public InOutPosInfo PosInfo { get; set; }
public BoxMovePosition MoveP { get; set; }
}
public LineMoveP MoveP { get; set; }
/// <summary>
/// 入料机构从哪个料串取料,或出库放到哪个料串
/// 0=未知,1=A侧料串,2=B侧料串
/// </summary>
public int ShelfType{ get; set; }=0;
}
/// <summary>
/// 出入库料盘信息
/// </summary>
......@@ -130,17 +136,8 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 出入库位置信息
/// </summary>
public class BoxMovePosition
public class LineMoveP
{
public BoxMovePosition()
{
}
public BoxMovePosition(BoxEquip_Config Config)
{
}
}
}
......@@ -14,16 +14,28 @@ namespace OnlineStore.DeviceLibrary
partial class InputEquip
{
protected override bool CheckWaitResult(DeviceMoveInfo moveInfo, WaitResultInfo wait)
{
{
return false;
}
}
#region 取放料
#region 入库
public override bool StartInstore(InOutParam param)
{
return false;
{
if (!NoAlarm())
{
LogInfo("报警中,无法开始取放料:" + param.PosInfo.ToStr() );
return false;
}
if (MoveInfo.MoveType.Equals(MoveType.None))
{
MoveInfo.NewMove(MoveType.InStore,param );
MoveInfo.NextMoveStep(StepEnum.II01_UpdownToP1);
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P1, Config.Updown_P1_Speed);
MoveLog($"开始入库{MoveInfo.SLog}: 料串{param.ShelfType},升降轴先返回P1{Config.Updown_P1}");
return true;
}
return false;
}
protected override void InstoreProcess()
......@@ -35,11 +47,12 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsInWait)
{
return;
}
}
}
#endregion
#region 出库
public override bool StartOutstore(InOutParam param)
{
return false;
......@@ -47,11 +60,7 @@ namespace OnlineStore.DeviceLibrary
protected override void OutstoreProcess()
{
}
#endregion
}
#endregion
}
}
......@@ -55,6 +55,13 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("IsDebug")]
public int IsDebug { get; set; }
/// <summary>
/// PRO,0,是否使用夹爪(1=使用夹爪,0=用吸盘),UseClampJaw,1,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("UseClampJaw")]
public int UseClampJaw { get; set; }
/// <summary>
/// PRO,0,A侧扫码的相机名称(多个用#分隔),CameraNameList_A,GigE:MV-CE200-10GC (00E78064929),,,,,,,,,,,,
/// </summary>
......@@ -173,82 +180,82 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("Updown_P11_BUpperL")]
public int Updown_P11_BUpperL { get; set; }
/// <summary>
/// PRO,0,取料升降轴_B下暂存区取料高点,Updown_P12_AUnderH,111,,,,,,,,,,,,
/// PRO,0,取料升降轴_B下暂存区取料高点,Updown_P12_BUnderH,111,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P12_AUnderH")]
public int Updown_P12_AUnderH { get; set; }
[ConfigProAttribute("Updown_P12_BUnderH")]
public int Updown_P12_BUnderH { get; set; }
/// <summary>
/// PRO,0,取料升降轴_B下暂存区取料低点,Updown_P13_AUnderL,112,,,,,,,,,,,,
/// PRO,0,取料升降轴_B下暂存区取料低点,Updown_P13_BUnderL,112,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P13_AUnderL")]
public int Updown_P13_AUnderL { get; set; }
[ConfigProAttribute("Updown_P13_BUnderL")]
public int Updown_P13_BUnderL { get; set; }
/// <summary>
/// PRO,0,取料旋转轴_P1速度,Updown_P1_Speed,108,,,,,,,,,,,,
/// PRO,0,取料升降轴_P1速度,Updown_P1_Speed,108,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P1_Speed")]
public int Updown_P1_Speed { get; set; }
/// <summary>
/// PRO,1,取料旋转轴_P2速度,Updown_P2_Speed,109,,,,,,,,,,,,
/// PRO,1,取料升降轴_P2速度,Updown_P2_Speed,109,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P2_Speed")]
public int Updown_P2_Speed { get; set; }
/// <summary>
/// PRO,2,取料旋转轴_P3速度,Updown_P3_Speed,110,,,,,,,,,,,,
/// PRO,2,取料升降轴_P3速度,Updown_P3_Speed,110,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P3_Speed")]
public int Updown_P3_Speed { get; set; }
/// <summary>
/// PRO,3,取料旋转轴_P4速度,Updown_P4_Speed,111,,,,,,,,,,,,
/// PRO,3,取料升降轴_P4速度,Updown_P4_Speed,111,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P4_Speed")]
public int Updown_P4_Speed { get; set; }
/// <summary>
/// PRO,4,取料旋转轴_P5速度,Updown_P5_Speed,112,,,,,,,,,,,,
/// PRO,4,取料升降轴_P5速度,Updown_P5_Speed,112,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P5_Speed")]
public int Updown_P5_Speed { get; set; }
/// <summary>
/// PRO,5,取料旋转轴_P6速度,Updown_P6_Speed,113,,,,,,,,,,,,
/// PRO,5,取料升降轴_P6速度,Updown_P6_Speed,113,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P6_Speed")]
public int Updown_P6_Speed { get; set; }
/// <summary>
/// PRO,6,取料旋转轴_P7速度,Updown_P7_Speed,114,,,,,,,,,,,,
/// PRO,6,取料升降轴_P7速度,Updown_P7_Speed,114,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P7_Speed")]
public int Updown_P7_Speed { get; set; }
/// <summary>
/// PRO,7,取料旋转轴_P8速度,Updown_P8_Speed,115,,,,,,,,,,,,
/// PRO,7,取料升降轴_P8速度,Updown_P8_Speed,115,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P8_Speed")]
public int Updown_P8_Speed { get; set; }
/// <summary>
/// PRO,8,取料旋转轴_P9速度,Updown_P9_Speed,116,,,,,,,,,,,,
/// PRO,8,取料升降轴_P9速度,Updown_P9_Speed,116,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P9_Speed")]
public int Updown_P9_Speed { get; set; }
/// <summary>
/// PRO,9,取料旋转轴_P10速度,Updown_P10_Speed,117,,,,,,,,,,,,
/// PRO,9,取料升降轴_P10速度,Updown_P10_Speed,117,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P10_Speed")]
public int Updown_P10_Speed { get; set; }
/// <summary>
/// PRO,10,取料旋转轴_P11速度,Updown_P11_Speed,118,,,,,,,,,,,,
/// PRO,10,取料升降轴_P11速度,Updown_P11_Speed,118,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P11_Speed")]
public int Updown_P11_Speed { get; set; }
/// <summary>
/// PRO,11,取料旋转轴_P12速度,Updown_P12_Speed,119,,,,,,,,,,,,
/// PRO,11,取料升降轴_P12速度,Updown_P12_Speed,119,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P12_Speed")]
public int Updown_P12_Speed { get; set; }
/// <summary>
/// PRO,12,取料旋转轴_P13速度,Updown_P13_Speed,120,,,,,,,,,,,,
/// PRO,12,取料升降轴_P13速度,Updown_P13_Speed,120,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Updown_P13_Speed")]
public int Updown_P13_Speed { get; set; }
/// <summary>
/// PRO,0,取料旋转轴_待机点,Middle_P1,100,,,,,,,,,,,,
/// PRO,0,取料升降轴_待机点,Middle_P1,100,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Middle_P1")]
public int Middle_P1 { get; set; }
......
......@@ -100,6 +100,12 @@
<Compile Include="FrmCrispTray.Designer.cs">
<DependentUpon>FrmCrispTray.cs</DependentUpon>
</Compile>
<Compile Include="inputForm\FrmBatchMove.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="inputForm\FrmBatchMove.Designer.cs">
<DependentUpon>FrmBatchMove.cs</DependentUpon>
</Compile>
<Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -139,6 +145,18 @@
<Compile Include="ManagerUtil.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="useControl\AxisMoveRectControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\AxisMoveRectControl.Designer.cs">
<DependentUpon>AxisMoveRectControl.cs</DependentUpon>
</Compile>
<Compile Include="useControl\AxisPointControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\AxisPointControl.Designer.cs">
<DependentUpon>AxisPointControl.cs</DependentUpon>
</Compile>
<Compile Include="useControl\ClampJawControl.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -157,6 +175,9 @@
<EmbeddedResource Include="FrmCrispTray.resx">
<DependentUpon>FrmCrispTray.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="inputForm\FrmBatchMove.resx">
<DependentUpon>FrmBatchMove.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource>
......@@ -185,6 +206,12 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="useControl\AxisMoveRectControl.resx">
<DependentUpon>AxisMoveRectControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\AxisPointControl.resx">
<DependentUpon>AxisPointControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\ClampJawControl.resx">
<DependentUpon>ClampJawControl.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -409,7 +409,7 @@ namespace OnlineStore.XLRStore
{
boxBean.IsDebug = true;
boxBean.Config.IsDebug = 1;
StoreManager.SaveMoveEquipConfig(boxBean.Config);
StoreManager.SaveBoxConfig(boxBean.Config);
boxBean.ChangeDebug(true);
LogUtil.info(boxBean.Name + "用户切换到调试状态 ");
}
......@@ -424,7 +424,7 @@ namespace OnlineStore.XLRStore
{
boxBean.IsDebug = false;
boxBean.Config.IsDebug = 0;
StoreManager.SaveMoveEquipConfig(boxBean.Config);
StoreManager.SaveBoxConfig(boxBean.Config);
boxBean.ChangeDebug(false);
LogUtil.info(boxBean.Name + "用户切换到正常工作状态 ");
}
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.CompilerServices;
using System.Threading;
using System.IO;
using System.Runtime.InteropServices;
using OnlineStore.DeviceLibrary;
using log4net;
using System.Reflection;
using UserFromControl;
using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
namespace OnlineStore.XLRStore
{
internal partial class FrmBatchMove : FrmBase
{
private bool IsLoad = false;
private BatchMoveBean moveBean;
internal FrmBatchMove(BatchMoveBean moveEquip)
{
this.moveBean = moveEquip;
Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
}
private bool IsInCheck = false;
private void timer1_Tick(object sender, EventArgs e)
{
try
{
if (!this.Visible)
{
return;
}
lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr();
}
catch (Exception ex)
{
LogUtil.error(moveBean.Name + "界面定时器出错:", ex);
}
}
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
{
try
{
if (this.timer1.Enabled)
{
this.timer1.Enabled = false;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error);
LogUtil.error("", ex);
}
}
private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{
axisMoveControl1.LoadData(StoreManager.XLRStore.inputEquip, new AxisBean[] { moveBean.BatchAxis });
lblName.Text = moveBean.Name;
batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.BatchAxisP1);
batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.BatchAxisP2 );
IsLoad = true;
}
private void FrmIOStatus_Shown(object sender, EventArgs e)
{
timer1.Start();
}
private void btnStart_Click(object sender, EventArgs e)
{
moveBean.Reset();
LogUtil.info(moveBean.Name + "点击:" + btnStart.Text);
}
private void btnSave_Click(object sender, EventArgs e)
{
int p1 = batchAxisP1.PointValue;
int p2 = batchAxisP2.PointValue;
moveBean.BatchAxisP1 = p1;
moveBean.BatchAxisP2 = p2;
if (moveBean.EquipType.Equals(1))
{
StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_A = p1;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_A = p2;
}
else
{
StoreManager.XLRStore.inputEquip.Config.BatchAxisP1_B = p1;
StoreManager.XLRStore.inputEquip.Config.BatchAxisP2_B = p2;
}
StoreManager.SaveInputEquipConfig(StoreManager.XLRStore.inputEquip.Config);
MessageBox.Show("保存成功");
}
private int TargetP2;
private bool StartTest = false;
private void btnStartTest_Click(object sender, EventArgs e)
{
ConfigMoveAxis moveAxis = moveBean.BatchAxis.Config;
bool isServoOn = AxisManager.instance.IsServeoOn(moveAxis.DeviceName, moveAxis.GetAxisValue());
if (!isServoOn)
{
MessageBox.Show(moveAxis.Explain + " 未打开,请先打开伺服 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
bool isStop = AxisManager.instance.GetBusyStatus(moveAxis.DeviceName, moveAxis.GetAxisValue()).Equals(0);
if (isServoOn && isStop)
{
//判断提升轴是否停止且到位
TargetP2 = moveBean.BatchAxisP2;
LogUtil.info(moveBean.Name + "点击:" + btnStartTest.Text + ",目标位置:" + moveBean.BatchAxisP2);
moveBean.BatchAxisToP2(true, false, true);
lblTestMsg.Text = "开始入料运动,目标位置[" + TargetP2 + "] ,开始位置[" + moveBean.StartMovePosition + "],";
StartTest = true;
}
else
{
MessageBox.Show(moveAxis.Explain + " 忙碌中,无法开始运动 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
private void btnTestStop_Click(object sender, EventArgs e)
{
LogUtil.info(moveBean.Name + "点击:" + btnTestStop.Text);
moveBean.BatchAxis.AxisStopCheckMove();
moveBean.BatchAxis.SuddenStop();
}
private void BatchTimerPro()
{
if (moveBean.BatchAxis.IsBatchMove())
{
btnStartTest.Enabled = false;
if (moveBean.LastMoveIsTest)
{
ConfigMoveAxis moveAxis = moveBean.BatchAxis.Config;
bool countError = false;
bool isStop = false;
bool result = AxisManager.instance.AbsMoveIsEnd(moveAxis.DeviceName, moveAxis.GetAxisValue(), TargetP2, moveAxis.CanErrorCountMax, out countError);
if (result)
{
isStop = true;
LogUtil.info(moveBean.Name + "提升轴上料功能测试,发现提升轴已到达目标位置【" + TargetP2 + "】,停止上料测试 ");
}
else
{
bool axisMoveIsEnd = HuichuanLibrary.HCBoardManager.MoveIsEnd(moveBean.BatchAxis.Config.GetAxisValue());
if (axisMoveIsEnd)
{
isStop = true;
LogUtil.info(moveBean.Name + "提升轴上料功能测试,发现提升轴已停止运动,停止上料测试");
}
}
if (isStop)
{
StartTest = false;
moveBean.BatchAxis.AxisStopCheckMove();
btnStartTest.Enabled = true;
btnTestStop.Enabled = false;
int height = moveBean.GetHeight();
lblTestMsg.Text = "目标位置[" + TargetP2 + "] ,开始位置[" + moveBean.StartMovePosition + "],停止位置[" + moveBean.EndMovePosition + "],高度[" + height + "]mm";
}
else
{
btnTestStop.Enabled = true;
}
}
else
{
btnTestStop.Enabled = false;
}
}
else
{
if (StartTest)
{
StartTest = false;
int height = moveBean.GetHeight();
lblTestMsg.Text = "目标位置[" + TargetP2 + "] ,开始位置[" + moveBean.StartMovePosition + "],停止位置[" + moveBean.EndMovePosition + "],高度[" + height + "]mm";
}
btnStartTest.Enabled = true;
btnTestStop.Enabled = false;
}
}
}
}
......@@ -286,19 +286,77 @@ namespace OnlineStore.XLRStore
}
private void FrmStoreIOStatus_Load(object sender, EventArgs e)
private void FrmInputEquip_Load(object sender, EventArgs e)
{
chbDebug.Checked = inputEquip.IsDebug;
//clampJawControl1.clampJaw = equipBean.ClampJwa;
clampJawControl1.ShowData();
chbMoveStop.Checked = inputEquip.MoveStop;
//axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis, equipBean.BatchAxis });
if (inputEquip.ClampJaw == null)
{
clampJawControl1.Visible = false;
}
else
{
clampJawControl1.clampJaw = inputEquip.ClampJaw;
clampJawControl1.ShowData();
}
axisMoveControl1.LoadData(inputEquip, new AxisBean[] { inputEquip.MiddleAxis, inputEquip.UpdownAxis });
FrmBatchMove frmMove1 = new FrmBatchMove(inputEquip.BatchMove_A);
AddForm(tabControl1, " " + inputEquip.BatchMove_A.Name + " ", frmMove1);
FrmBatchMove frmMove2 = new FrmBatchMove(inputEquip.BatchMove_B);
AddForm(tabControl1, " " + inputEquip.BatchMove_B.Name + " ", frmMove2);
LoadPoint();
IsLoad = true;
}
private void LoadPoint()
{
InputEquip_Config config = inputEquip.Config ;
mideleAxisP1.SetMoveData(inputEquip.MiddleAxis, config.Middle_P1_Speed,config.Middle_P1);
mideleAxisP2.SetMoveData(inputEquip.MiddleAxis, config.Middle_P2_Speed,config.Middle_P2_ATake);
mideleAxisP3.SetMoveData(inputEquip.MiddleAxis, config.Middle_P3_Speed,config.Middle_P3_BTake);
mideleAxisP4.SetMoveData(inputEquip.MiddleAxis, config.Middle_P4_Speed,config.Middle_P4_AUpper);
mideleAxisP5.SetMoveData(inputEquip.MiddleAxis, config.Middle_P5_Speed,config.Middle_P5_BUpper);
mideleAxisP6.SetMoveData(inputEquip.MiddleAxis, config.Middle_P6_Speed,config.Middle_P6_NG);
mideleAxisP7.SetMoveData(inputEquip.MiddleAxis, config.Middle_P7_Speed,config.Middle_P7_AUnder);
mideleAxisP8.SetMoveData(inputEquip.MiddleAxis, config.Middle_P8_Speed,config.Middle_P8_BUnder);
updownAxisP1.SetMoveData(inputEquip.UpdownAxis, config.Updown_P1_Speed,config.Updown_P1);
updownAxisP2.SetMoveData(inputEquip.UpdownAxis, config.Updown_P2_Speed,config.Updown_P2_ATake);
updownAxisP3.SetMoveData(inputEquip.UpdownAxis, config.Updown_P3_Speed,config.Updown_P3_BTake);
updownAxisP4.SetMoveData(inputEquip.UpdownAxis, config.Updown_P4_Speed,config.Updown_P4_AUpperH);
updownAxisP5.SetMoveData(inputEquip.UpdownAxis, config.Updown_P5_Speed,config.Updown_P5_AUpperL);
updownAxisP6.SetMoveData(inputEquip.UpdownAxis, config.Updown_P6_Speed,config.Updown_P6_AUnderH);
updownAxisP7.SetMoveData(inputEquip.UpdownAxis, config.Updown_P7_Speed,config.Updown_P7_AUnderL);
updownAxisP8.SetMoveData(inputEquip.UpdownAxis, config.Updown_P8_Speed,config.Updown_P8_NGH);
updownAxisP9.SetMoveData(inputEquip.UpdownAxis, config.Updown_P9_Speed,config.Updown_P9_NGL);
updownAxisP10.SetMoveData(inputEquip.UpdownAxis, config.Updown_P10_Speed,config.Updown_P10_BUpperH);
updownAxisP11.SetMoveData(inputEquip.UpdownAxis, config.Updown_P11_Speed,config.Updown_P11_BUpperL);
updownAxisP12.SetMoveData(inputEquip.UpdownAxis, config.Updown_P12_Speed,config.Updown_P12_BUnderH);
updownAxisP13.SetMoveData(inputEquip.UpdownAxis, config.Updown_P13_Speed,config.Updown_P12_BUnderH);
}
protected void AddForm(TabControl tabcon, string text, Form form)
{
//text = text.PadRight(10, ' ');
TabPage lineTabPage = new TabPage(text);
// lineTabPage.AutoScroll = true;
// lineTabPage.Tag = StoreBean;
Panel linePan = new Panel();
linePan.Dock = DockStyle.Fill;
linePan.AutoScroll = true;
lineTabPage.Controls.Add(linePan);
form.FormBorderStyle = FormBorderStyle.None;
form.TopLevel = false;
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();
//tabPageList.Add(lineTabPage);
tabcon.Controls.Add(lineTabPage);
}
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index < 0)
......@@ -321,6 +379,7 @@ namespace OnlineStore.XLRStore
private void FrmIOStatus_Shown(object sender, EventArgs e)
{
timer1.Start();
}
......@@ -423,7 +482,103 @@ namespace OnlineStore.XLRStore
inputEquip.MoveStop = chbMoveStop.Checked;
LogUtil.info(inputEquip.Name + "用户切换是否暂停: " + inputEquip.MoveStop);
}
private void Shelf_StopUp_A_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_A.Name + "点击:" + Shelf_StopUp_A.Text);
inputEquip.BatchMove_A.StopUp();
}
private void Shelf_StopDown_A_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_A.Name + "点击:" + Shelf_StopDown_A.Text);
inputEquip.BatchMove_A.StopDown();
}
private void LineStart_A_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_A.Name + "点击:" + LineStart_A.Text);
inputEquip.BatchMove_A.LineRun();
}
private void LineBack_A_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_A.Name + "点击:" + LineBack_A.Text);
inputEquip.BatchMove_A.LineBack();
}
private void LineStop_A_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_A.Name + "点击:" + LineStop_A.Text);
inputEquip.BatchMove_A.LineStop();
}
private void Shelf_StopUp_B_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_B.Name + "点击:" + Shelf_StopUp_B.Text);
inputEquip.BatchMove_B.StopUp();
}
private void Shelf_StopDown_B_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_B.Name + "点击:" + Shelf_StopDown_B.Text);
inputEquip.BatchMove_B.StopDown();
}
private void LineStart_B_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_B.Name + "点击:" + LineStart_B.Text);
inputEquip.BatchMove_B.LineRun();
}
private void LineBack_B_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_B.Name + "点击:" + LineBack_B.Text);
inputEquip.BatchMove_B.LineBack();
}
private void LineStop_B_Click(object sender, EventArgs e)
{
LogUtil.info(inputEquip.BatchMove_B.Name + "点击:" + LineStop_B.Text);
inputEquip.BatchMove_B.LineStop();
}
private void btnSave_Click(object sender, EventArgs e)
{
inputEquip.Config.Updown_P1 = updownAxisP1.PointValue;
inputEquip.Config.Updown_P2_ATake = updownAxisP2.PointValue;
inputEquip.Config.Updown_P3_BTake = updownAxisP3.PointValue;
inputEquip.Config.Updown_P4_AUpperH = updownAxisP4.PointValue;
inputEquip.Config.Updown_P5_AUpperL = updownAxisP5.PointValue;
inputEquip.Config.Updown_P6_AUnderH = updownAxisP6.PointValue;
inputEquip.Config.Updown_P7_AUnderL = updownAxisP7.PointValue;
inputEquip.Config.Updown_P8_NGH = updownAxisP8.PointValue;
inputEquip.Config.Updown_P9_NGL = updownAxisP9.PointValue;
inputEquip.Config.Updown_P10_BUpperH = updownAxisP10.PointValue;
inputEquip.Config.Updown_P11_BUpperL = updownAxisP11.PointValue;
inputEquip.Config.Updown_P12_BUnderH = updownAxisP12.PointValue;
inputEquip.Config.Updown_P12_BUnderH = updownAxisP13.PointValue;
inputEquip.Config.Middle_P1 = mideleAxisP1.PointValue;
inputEquip.Config.Middle_P2_ATake = mideleAxisP2.PointValue;
inputEquip.Config.Middle_P3_BTake = mideleAxisP3.PointValue;
inputEquip.Config.Middle_P4_AUpper = mideleAxisP4.PointValue;
inputEquip.Config.Middle_P5_BUpper = mideleAxisP5.PointValue;
inputEquip.Config.Middle_P6_NG = mideleAxisP6.PointValue;
inputEquip.Config.Middle_P7_AUnder = mideleAxisP7.PointValue;
inputEquip.Config.Middle_P8_BUnder = mideleAxisP8.PointValue;
StoreManager.SaveInputEquipConfig(inputEquip.Config);
MessageBox.Show("保存成功");
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
}
}
......
......@@ -160,7 +160,7 @@ namespace OnlineStore.XLRStore
btnDelMove.Text = "点动-(下降)";
//txtASpeed.Text = "1000";
//txtjogSpeed.Text = "1000";
color = Color.Red;
color = Color.Green;
}
txtASpeed.Text =(currSelAxis.TargetSpeed/2).ToString();
txtMiddleSpeed.Text = (currSelAxis.TargetSpeed / 2).ToString();
......

namespace OnlineStore.XLRStore.useControl
{
partial class AxisMoveRectControl
{
/// <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.groupBox2.SuspendLayout();
this.groupAxis.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Location = new System.Drawing.Point(454, 14);
this.groupBox2.Size = new System.Drawing.Size(242, 237);
//
// label4
//
this.label4.Location = new System.Drawing.Point(7, 190);
//
// lblhomeSts
//
this.lblhomeSts.Location = new System.Drawing.Point(72, 190);
//
// label2
//
this.label2.Location = new System.Drawing.Point(124, 190);
//
// lblAxEncAcc
//
this.lblAxEncAcc.Location = new System.Drawing.Point(195, 190);
//
// lblINP
//
this.lblINP.Location = new System.Drawing.Point(143, 50);
this.lblINP.Size = new System.Drawing.Size(46, 30);
//
// lblBUSY
//
this.lblBUSY.Location = new System.Drawing.Point(97, 50);
this.lblBUSY.Size = new System.Drawing.Size(46, 30);
//
// lblNEL
//
this.lblNEL.Location = new System.Drawing.Point(51, 50);
this.lblNEL.Size = new System.Drawing.Size(46, 30);
//
// lblORG
//
this.lblORG.Location = new System.Drawing.Point(189, 19);
this.lblORG.Size = new System.Drawing.Size(46, 30);
//
// lblPEL
//
this.lblPEL.Location = new System.Drawing.Point(143, 19);
this.lblPEL.Size = new System.Drawing.Size(46, 30);
//
// lblSvOn
//
this.lblSvOn.Size = new System.Drawing.Size(46, 30);
//
// lblEMG
//
this.lblEMG.Location = new System.Drawing.Point(97, 19);
this.lblEMG.Size = new System.Drawing.Size(46, 30);
//
// lblWARN
//
this.lblWARN.Location = new System.Drawing.Point(189, 50);
this.lblWARN.Size = new System.Drawing.Size(46, 30);
//
// lblALM
//
this.lblALM.Location = new System.Drawing.Point(51, 19);
this.lblALM.Size = new System.Drawing.Size(46, 30);
//
// label53
//
this.label53.Location = new System.Drawing.Point(124, 114);
//
// label56
//
this.label56.Location = new System.Drawing.Point(7, 114);
//
// label55
//
this.label55.Location = new System.Drawing.Point(7, 89);
//
// label52
//
this.label52.Location = new System.Drawing.Point(124, 89);
//
// lblAxEncVel
//
this.lblAxEncVel.Location = new System.Drawing.Point(72, 114);
//
// lblAxPrfVel
//
this.lblAxPrfVel.Location = new System.Drawing.Point(189, 114);
//
// lblAxEncPos
//
this.lblAxEncPos.Location = new System.Drawing.Point(72, 89);
//
// lblAxPrfPos
//
this.lblAxPrfPos.Location = new System.Drawing.Point(189, 89);
//
// lblAxisPrfMode
//
this.lblAxisPrfMode.Location = new System.Drawing.Point(72, 165);
//
// label50
//
this.label50.Location = new System.Drawing.Point(7, 165);
//
// lblAlarmcode
//
this.lblAlarmcode.Location = new System.Drawing.Point(124, 165);
//
// label7
//
this.label7.Location = new System.Drawing.Point(7, 215);
//
// lblMaxLmt
//
this.lblMaxLmt.Location = new System.Drawing.Point(72, 215);
//
// label12
//
this.label12.Location = new System.Drawing.Point(124, 139);
//
// label13
//
this.label13.Location = new System.Drawing.Point(7, 139);
//
// lblPosLmt
//
this.lblPosLmt.Location = new System.Drawing.Point(72, 139);
//
// lblNegLmt
//
this.lblNegLmt.Location = new System.Drawing.Point(189, 139);
//
// groupAxis
//
this.groupAxis.Size = new System.Drawing.Size(699, 262);
//
// btnOpenAxis
//
this.btnOpenAxis.Size = new System.Drawing.Size(100, 34);
//
// btnCloseAxis
//
this.btnCloseAxis.Location = new System.Drawing.Point(345, 5);
this.btnCloseAxis.Size = new System.Drawing.Size(100, 34);
//
// btnAxisRMove
//
this.btnAxisRMove.Size = new System.Drawing.Size(100, 34);
//
// btnAxisReturnHome
//
this.btnAxisReturnHome.Size = new System.Drawing.Size(100, 34);
//
// btnAxisAMove
//
this.btnAxisAMove.Size = new System.Drawing.Size(100, 34);
//
// btnAxisStop
//
this.btnAxisStop.Location = new System.Drawing.Point(345, 85);
this.btnAxisStop.Size = new System.Drawing.Size(100, 75);
//
// panel1
//
this.panel1.Size = new System.Drawing.Size(449, 236);
//
// btnDelMove
//
this.btnDelMove.Location = new System.Drawing.Point(292, 180);
this.btnDelMove.Size = new System.Drawing.Size(130, 45);
//
// btnAddMove
//
this.btnAddMove.Size = new System.Drawing.Size(130, 45);
//
// btnEndHome
//
this.btnEndHome.Location = new System.Drawing.Point(345, 45);
this.btnEndHome.Size = new System.Drawing.Size(100, 34);
//
// AxisMoveRectControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Name = "AxisMoveRectControl";
this.Size = new System.Drawing.Size(709, 272);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
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.XLRStore.useControl
{
public partial class AxisMoveRectControl : AxisMoveControl
{
public AxisMoveRectControl()
{
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>
<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>
\ No newline at end of file

namespace OnlineStore.XLRStore.useControl
{
partial class AxisPointControl
{
/// <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.btnMove = new System.Windows.Forms.Button();
this.txtPoint = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// btnMove
//
this.btnMove.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnMove.BackColor = System.Drawing.SystemColors.Control;
this.btnMove.Cursor = System.Windows.Forms.Cursors.Default;
this.btnMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMove.ForeColor = System.Drawing.Color.Black;
this.btnMove.Location = new System.Drawing.Point(3, 3);
this.btnMove.Name = "btnMove";
this.btnMove.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnMove.Size = new System.Drawing.Size(154, 34);
this.btnMove.TabIndex = 315;
this.btnMove.Text = "上升待机点P1:";
this.btnMove.UseVisualStyleBackColor = true;
this.btnMove.Click += new System.EventHandler(this.btnMove_Click);
//
// txtPoint
//
this.txtPoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtPoint.BackColor = System.Drawing.SystemColors.Window;
this.txtPoint.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtPoint.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPoint.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtPoint.Location = new System.Drawing.Point(160, 6);
this.txtPoint.MaxLength = 12;
this.txtPoint.Name = "txtPoint";
this.txtPoint.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtPoint.Size = new System.Drawing.Size(70, 26);
this.txtPoint.TabIndex = 316;
this.txtPoint.Text = "-1";
//
// AxisPointControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.btnMove);
this.Controls.Add(this.txtPoint);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "AxisPointControl";
this.Size = new System.Drawing.Size(233, 41);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
internal System.Windows.Forms.Button btnMove;
internal System.Windows.Forms.TextBox txtPoint;
}
}
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
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.XLRStore.useControl
{
public partial class AxisPointControl : UserControl
{
public AxisPointControl()
{
InitializeComponent();
}
public string PointText
{
get { return btnMove.Text; }
set { btnMove.Text = value; }
}
public int PointValue
{
get { return FormUtil.GetIntValue( txtPoint.Text); }
set { txtPoint.Text = value.ToString(); }
}
public Color PointBackColor
{
get { return btnMove.BackColor; }
set { this.btnMove.BackColor = value; }
}
public Color PointForeColor
{
get { return btnMove.ForeColor; }
set { this.btnMove.ForeColor = value; }
}
private int MoveSpeed;
private AxisBean MoveAxis = null;
public void SetMoveData(AxisBean axisBean,int speed,int pointV)
{
this.MoveAxis = axisBean;
this.MoveSpeed = speed;
this.PointValue = pointV;
}
private void btnMove_Click(object sender, EventArgs e)
{
int v = FormUtil.GetIntValue(txtPoint);
LogUtil.info(this.Name+" "+ MoveAxis.AxisName + " 点击:" + btnMove.Text);
MoveAxis.AbsMove(null, v, MoveSpeed);
}
}
}
<?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
库位号格式:
例:05AA03040102
05:表示料仓编号,01-08
AA:存储机构A面或B面,AA或者BB
03:表示抽屉在第几行
04:表示抽屉在第几列
01:表示在抽屉中的第几行
02:表示在抽屉中的第几列
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!