Commit 898b84e1 renym1968

进料轴序号改为轴五(原为轴四)

界面增加相关轴五的配置。
1 个父辈 279e5762
......@@ -54,6 +54,11 @@
this.btnComMove = new System.Windows.Forms.Button();
this.txtComSpeed = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtChargingPosition = new System.Windows.Forms.TextBox();
this.btnChargingMovej = new System.Windows.Forms.Button();
this.btnChargingMove = new System.Windows.Forms.Button();
this.txtChargingSpeed = new System.Windows.Forms.TextBox();
this.lblCharging = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
......@@ -178,7 +183,7 @@
//
// button1
//
this.button1.Location = new System.Drawing.Point(401, 336);
this.button1.Location = new System.Drawing.Point(458, 349);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 16;
......@@ -277,11 +282,68 @@
this.label4.TabIndex = 22;
this.label4.Text = "(轴四)压紧轴";
//
// txtChargingPosition
//
this.txtChargingPosition.Location = new System.Drawing.Point(551, 296);
this.txtChargingPosition.Name = "txtChargingPosition";
this.txtChargingPosition.Size = new System.Drawing.Size(108, 23);
this.txtChargingPosition.TabIndex = 31;
this.txtChargingPosition.Visible = false;
//
// btnChargingMovej
//
this.btnChargingMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnChargingMovej.Location = new System.Drawing.Point(401, 291);
this.btnChargingMovej.Name = "btnChargingMovej";
this.btnChargingMovej.Size = new System.Drawing.Size(131, 36);
this.btnChargingMovej.TabIndex = 30;
this.btnChargingMovej.Text = "进料轴-(下降)";
this.btnChargingMovej.UseVisualStyleBackColor = false;
this.btnChargingMovej.Visible = false;
this.btnChargingMovej.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnChargingMovej_MouseDown);
this.btnChargingMovej.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnChargingMovej_MouseUp);
//
// btnChargingMove
//
this.btnChargingMove.BackColor = System.Drawing.SystemColors.Control;
this.btnChargingMove.Location = new System.Drawing.Point(266, 291);
this.btnChargingMove.Name = "btnChargingMove";
this.btnChargingMove.Size = new System.Drawing.Size(131, 36);
this.btnChargingMove.TabIndex = 29;
this.btnChargingMove.Text = "进料轴+(上升)";
this.btnChargingMove.UseVisualStyleBackColor = false;
this.btnChargingMove.Visible = false;
this.btnChargingMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnChargingMove_MouseDown);
this.btnChargingMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnChargingMove_MouseUp);
//
// txtChargingSpeed
//
this.txtChargingSpeed.Location = new System.Drawing.Point(150, 296);
this.txtChargingSpeed.Name = "txtChargingSpeed";
this.txtChargingSpeed.Size = new System.Drawing.Size(108, 23);
this.txtChargingSpeed.TabIndex = 28;
this.txtChargingSpeed.Visible = false;
//
// lblCharging
//
this.lblCharging.AutoSize = true;
this.lblCharging.Location = new System.Drawing.Point(39, 298);
this.lblCharging.Name = "lblCharging";
this.lblCharging.Size = new System.Drawing.Size(95, 17);
this.lblCharging.TabIndex = 27;
this.lblCharging.Text = "(轴五)进l料轴";
this.lblCharging.Visible = false;
//
// FrmAxisDebug
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(707, 413);
this.Controls.Add(this.txtChargingPosition);
this.Controls.Add(this.btnChargingMovej);
this.Controls.Add(this.btnChargingMove);
this.Controls.Add(this.txtChargingSpeed);
this.Controls.Add(this.lblCharging);
this.Controls.Add(this.txtComPosition);
this.Controls.Add(this.btnComMovej);
this.Controls.Add(this.btnComMove);
......@@ -343,5 +405,10 @@
private System.Windows.Forms.Button btnComMove;
private System.Windows.Forms.TextBox txtComSpeed;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtChargingPosition;
private System.Windows.Forms.Button btnChargingMovej;
private System.Windows.Forms.Button btnChargingMove;
private System.Windows.Forms.TextBox txtChargingSpeed;
private System.Windows.Forms.Label lblCharging;
}
}
\ No newline at end of file
......@@ -25,6 +25,9 @@ namespace OnlineStore.ACSingleStore
private ConfigMoveAxis inout = null;
private int compress_Slv = 0;
//add by renym 2018-11-26 定义轴五
private ConfigMoveAxis charging = null;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmAxisDebug(AC_SA_BoxBean boxBean)
{
......@@ -32,6 +35,19 @@ namespace OnlineStore.ACSingleStore
updown = boxBean.Config.UpDown_Axis;
compress_Slv = boxBean.Config.CompressAxis_Slv;
inout = boxBean.Config.InOut_Axis;
//
if (boxBean.Config.Charging_Axis != null)
{
charging = boxBean.Config.Charging_Axis;
this.txtChargingPosition.Visible = true;
this.btnChargingMove.Visible = true;
this.btnChargingMovej.Visible = true;
this.txtChargingSpeed.Visible = true;
this.lblCharging.Visible = true;
}
InitializeComponent();
txtComSpeed.Text = boxBean.Config.CompressAxis_EndSpeed.ToString();
this.Text = boxBean.StoreName + "_轴点动调试";
......@@ -49,6 +65,10 @@ namespace OnlineStore.ACSingleStore
txtInOutSpeed.Text = inout.TargetSpeed.ToString();
txtUpDownSpeed.Text = updown.TargetSpeed.ToString();
txtComSpeed.Text = ACStoreManager.store.Config.CompressAxis_EndSpeed.ToString();
//add by renym 2018-11-26
if(charging !=null)
txtChargingSpeed.Text = charging.TargetSpeed.ToString();
timer1.Start();
}
/// <summary>
......@@ -311,6 +331,9 @@ namespace OnlineStore.ACSingleStore
UpdateInOutPosition();
UpdateUpdownPosition();
txtComPosition.Text = ShuoKeControls.GetLastPosition(compress_Slv).ToString();
//add by renym 2018-11-26
if (charging != null)
UpdateChargingPosition();
}
}
......@@ -340,5 +363,77 @@ namespace OnlineStore.ACSingleStore
txtInOutPosition.Text = inoutPosition.ToString();
}
}
//add by Reny 2018-11-26
private void UpdateChargingPosition()
{
int chargingPosition = ACServerManager.GetTargetPosition(charging.DeviceName, charging.GetAxisValue());
if (!txtChargingPosition.Text.Equals(chargingPosition.ToString()))
{
txtChargingPosition.Text = chargingPosition.ToString();
}
}
private void btnChargingMove_MouseDown(object sender, MouseEventArgs e)
{
//if (!InOutIsIsP1())
//{
// return;
//}
if (btnChargingMove .BackColor.Equals(System.Drawing.SystemColors.Control))
{
int speed = FormUtil.GetIntValue(txtChargingSpeed);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
btnUpDownMove.BackColor = Color.Green;
AxisMove(charging, speed);
}
}
private void btnChargingMove_MouseUp(object sender, MouseEventArgs e)
{
if (btnChargingMove.BackColor == Color.Green)
{
btnChargingMove.BackColor = System.Drawing.SystemColors.Control;
ACServerManager.SuddenStop(charging.DeviceName, charging.GetAxisValue());
UpdateChargingPosition();
}
}
private void btnChargingMovej_MouseDown(object sender, MouseEventArgs e)
{
//if (!InOutIsIsP1())
//{
// return;
//}
if (btnChargingMovej.BackColor.Equals(System.Drawing.SystemColors.Control))
{
int speed = FormUtil.GetIntValue(txtChargingSpeed);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
return;
}
btnChargingMovej.BackColor = Color.Green;
AxisMove(charging, -speed);
}
}
private void btnChargingMovej_MouseUp(object sender, MouseEventArgs e)
{
if (btnChargingMovej.BackColor == Color.Green)
{
btnChargingMovej.BackColor = System.Drawing.SystemColors.Control;
ACServerManager.SuddenStop(charging.DeviceName, charging.GetAxisValue());
UpdateChargingPosition();
}
}
}
}
......@@ -37,6 +37,14 @@ namespace OnlineStore.ACSingleStore
this.boxBean = store;
this.StoreId = store.StoreID;
if (store.Config.Charging_Axis != null)
{
btnSucker_SuctionSOL.Visible = true;
btnSuckerDown.Visible = true;
btnSuckerUp.Visible = true;
btnOpenGateLock.Visible = true;
btnCloseGateLock.Visible = true;
}
LoadIOList();
}
......
......@@ -25,18 +25,49 @@ namespace OnlineStore.ACSingleStore
private AC_SA_BoxBean store;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool bolCharging = false; //自动上料标志 =true 自动上料 add by Renym 2018-11-20
public FrmStoreBox()
{
Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
chbAuto.Checked = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1);
}
// 初始化自动进料轴 界面add by Renym 2018-11-22
private void InitAxis4()
{
if (bolCharging)
{
this.lblCountPulse4.Visible = true;
this.lblOutPulse4.Visible = true;
this.txtChargingTarget.Visible = true;
this.axis_4_Alarm.Visible = true;
this.lblCharging.Visible = true;
groupBoxChuck.Visible = true;
this.打开门锁ToolStripMenuItem.Visible = true;
this.关闭门锁ToolStripMenuItem.Visible = true;
}
else
{
this.lblCountPulse4.Visible = false;
this.lblOutPulse4.Visible = false;
this.txtChargingTarget.Visible = false;
this.axis_4_Alarm.Visible = false;
this.lblCharging.Visible = false;
groupBoxChuck.Visible = false;
this.打开门锁ToolStripMenuItem.Visible = false;
this.关闭门锁ToolStripMenuItem.Visible = false;
}
}
#region "初始化界面数据"
private void initValue()
{
InitStoreValue();
if (store.Config.Charging_Axis == null)
this.bolCharging = false; //add by renym
else
this.bolCharging = true;
InitAxis4(); //addby renym 2018-11-22
}
private void InitStoreValue()
{
......@@ -352,6 +383,24 @@ namespace OnlineStore.ACSingleStore
lblCountPulse.Text = lblCountPulse3.Text;
}
}
//add by renym 2018-11-22
if (bolCharging)
{
if (ACServerManager.ServerOnStatus(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue()))
{
axis_4_Alarm.IOValue = ACServerManager.GetAlarmStatus(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
int lOutPulse4 = ACServerManager.GetTargetPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
lblOutPulse4.Text = string.Format("{0:d}", lOutPulse4);
int lCountPulse4 = ACServerManager.GetActualtPosition(store.Config.Charging_Axis.DeviceName, store.Config.Charging_Axis.GetAxisValue());
lblCountPulse4.Text = string.Format("{0:d}", lCountPulse4);
txtChargingTarget.Text = store.Config.Charging_Axis.TargetPosition.ToString();
if (deviceName.Equals(store.Config.Charging_Axis.DeviceName))
{
lblOutPulse.Text = lblOutPulse4.Text;
lblCountPulse.Text = lblCountPulse4.Text;
}
}
}
}
private void Bt_ClearCounter_Click(object sender, EventArgs e)
......@@ -1407,5 +1456,22 @@ namespace OnlineStore.ACSingleStore
{
}
private void 打开门锁ToolStripMenuItem_Click(object sender, EventArgs e)
{
//store.KNDIOMove(IO_Type.GateLock_Open, IO_VALUE.HIGH);
//store.KNDIOMove(IO_Type.GateLock_Close, IO_VALUE.LOW);
}
private void 关闭门锁ToolStripMenuItem_Click(object sender, EventArgs e)
{
//store.KNDIOMove(IO_Type.GateLock_Open, IO_VALUE.LOW);
//store.KNDIOMove(IO_Type.GateLock_Close, IO_VALUE.HIGH);
}
private void iO状态查看ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}
......@@ -94,6 +94,11 @@ namespace OnlineStore.DeviceLibrary
AC_SA_BoxBean storeBean = new AC_SA_BoxBean((AC_SA_Config)storeConfig);
storeBean.CID = CID;
LogUtil.info(LOGGER, "加载料仓完成!");
//add by renym 2018-11-26 进料轴标志设置
if (storeBean.Config.Charging_Axis != null)
storeBean.IsHasCharging_Axis = false;
else
storeBean.IsHasCharging_Axis = true;
store = storeBean;
return store;
}
......
......@@ -36,6 +36,7 @@ namespace OnlineStore.DeviceLibrary
/// 轴报警信息
/// </summary>
private Dictionary<string , AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string , AxisAlarmInfo>();
public bool IsHasCharging_Axis = false;
/// <summary>
/// 是否有压紧轴
......@@ -293,6 +294,9 @@ namespace OnlineStore.DeviceLibrary
ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
//add by Renym 2018-11-26
if(Config.Charging_Axis!=null)
ACServerManager.SuddenStop(Config.Charging_Axis.DeviceName, Config.Charging_Axis.GetAxisValue());
isInSuddenDown = false;
isNoAirCheck = false;
alarmType = StoreAlarmType.None;
......
......@@ -48,6 +48,12 @@ namespace OnlineStore.DeviceLibrary
/// 夹具检测信号常亮
/// </summary>
public static int FixtureCheckHigh = 17;
//
/// add by renym 2018-11-26
/// /// <summary>
/// 轴四(上料轴)报警
/// </summary>
public static int ChargingAxisAlarm = 18;
}
}
......@@ -79,5 +79,10 @@ namespace OnlineStore.DeviceLibrary
/// 轴4( 压紧轴) 压紧前点P3
/// </summary>
public int ComPress_P3{ get; set; }
/// <summary>
/// 轴4( 进料轴) 待机原位点P1
/// </summary>
public int Charging_P1 { get; set; } // add by renym 2018-11-26
}
}
......@@ -118,18 +118,18 @@ namespace OnlineStore.LoadCSVLibrary
#region
/// add by renym 2018-11-22
/// <summary>
/// PRO (轴)进料轴轴原点目标速度 ChargingAxis_TargetSpeed 120000
/// PRO (轴)进料轴轴原点目标速度 ChargingAxis_TargetSpeed 120000
/// </summary>
[ConfigProAttribute("ChargingAxis_TargetSpeed", false)]
public int ChargingAxis_TargetSpeed { get; set; }
/// <summary>
/// PRO (轴)进料轴轴加速度 ChargingAxis_AddSpeed 200
/// PRO (轴)进料轴轴加速度 ChargingAxis_AddSpeed 200
/// </summary>
[ConfigProAttribute("ChargingAxis_AddSpeed", false)]
public short ChargingAxis_AddSpeed { get; set; }
/// <summary>
/// PRO (轴)进料轴轴减速度 ChargingAxis_DelSpeed 200
/// PRO (轴)进料轴轴减速度 ChargingAxis_DelSpeed 200
/// </summary>
[ConfigProAttribute("ChargingAxis_DelSpeed", false)]
public short ChargingAxis_DelSpeed { get; set; }
......@@ -301,7 +301,7 @@ namespace OnlineStore.LoadCSVLibrary
///add 2018-11-22 by renym
/// <summary>
/// PRO (轴)进料轴停止时可误差的脉冲数的最小值 ChargingAxis_ErrorCountMin 200
/// PRO (轴)进料轴停止时可误差的脉冲数的最小值 ChargingAxis_ErrorCountMin 200
/// </summary>
[ConfigProAttribute("ChargingAxis_ErrorCountMin", false)]
public int ChargingAxis_ErrorCountMin { get; set; }
......@@ -324,7 +324,7 @@ namespace OnlineStore.LoadCSVLibrary
///Add 2018-11-22 by renym
/// <summary>
/// PRO (轴)进料轴停止时可误差的脉冲数的最大值 ChargingAxis_ErrorCountMax 500
/// PRO (轴)进料轴停止时可误差的脉冲数的最大值 ChargingAxis_ErrorCountMax 500
/// </summary>
[ConfigProAttribute("ChargingAxis_ErrorCountMax", false)]
public int ChargingAxis_ErrorCountMax { get; set; }
......@@ -420,7 +420,7 @@ namespace OnlineStore.LoadCSVLibrary
public ConfigMoveAxis InOut_Axis { get; set; }
/// <summary>
/// 轴4进料轴(上/下)
/// 轴5进料轴(上/下)
/// add by renym 2018-11-21
/// </summary>
[ConfigProAttribute("Charging_Axis", false)]
......@@ -499,12 +499,12 @@ namespace OnlineStore.LoadCSVLibrary
public int InoutAxis_PositionMin { get; set; }
/// <summary>
/// PRO (轴)进出轴最小限位 ChargingAxis_PositionMin
/// PRO (轴)进出轴最小限位 ChargingAxis_PositionMin
/// </summary>
[ConfigProAttribute("ChargingAxis_PositionMin", false)]
public int ChargingAxis_PositionMin { get; set; }
/// <summary>
/// PRO (轴)进料轴最大限位 ChargingAxis_PositionMax
/// PRO (轴)进料轴最大限位 ChargingAxis_PositionMax
/// </summary>
[ConfigProAttribute("ChargingAxis_PositionMax", false)]
public int ChargingAxis_PositionMax { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!