Commit 45f99b75 LN

BUG修改

1 个父辈 b592ccdc
......@@ -50,14 +50,14 @@ namespace OnlineStore.DeviceLibrary
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 = 0, int ptpAcc = 0, int ptpDec = 0);
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 = 0, int ptpAcc = 0, int ptpDec = 0);
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);
......
......@@ -19,7 +19,7 @@ namespace OnlineStore.DeviceLibrary
{
return HCBoardManager.CloseCard();
}
public override void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed=0,int ptpAcc=0,int ptpDec=0)
public override void AbsMove(string portName, short slvAddr, int targetPosition, int targetSpeed,int ptpAcc,int ptpDec)
{
HCBoardManager.AbsMove((short)slvAddr, targetPosition, targetSpeed, ptpAcc, ptpDec);
}
......@@ -107,7 +107,7 @@ namespace OnlineStore.DeviceLibrary
{
return HCBoardManager.IsInPosition(slvAddr, PPosition,canErrorCount );
}
public override void RelMove(string portName, short slvAddr, int position, int targetSpeed = 0, int ptpAcc = 0, int ptpDec = 0)
public override void RelMove(string portName, short slvAddr, int position, int targetSpeed, int ptpAcc , int ptpDec )
{
HCBoardManager.RelMove(slvAddr, position, targetSpeed, ptpAcc, ptpDec);
}
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,(轴一)旋转轴,Middle_Axis,4,HC,,250,1000,1000,30,200,2000,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,5,HC,,150,400,400,30,150,1000,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,6,HC,,100,300,300,30,100,500,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,7,HC,,100,300,300,50,300,500,10,100,0,0
AXIS,0,(轴一)旋转轴,Middle_Axis,4,HC,,1500,1000,1000,200,600,1000,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,5,HC,,150,400,400,100,200,500,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,6,HC,,500,300,300,100,300,500,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,7,HC,,100,300,300,20,60,200,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料点 P1,UpDownAxis_DoorOPosition_P1,304500,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,325300,,,,,,,,,,,,
......@@ -33,6 +33,6 @@ PRO,0,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,,
PRO,0,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,,
PRO,0,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,,,,,,
PRO,0,是否调试状态,ISDebug,0,,,,,,,,,,,,
PRO,,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,,,,,,
PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,, ,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,每次吹气的时间(分钟),BlowAir_Time,10,,,
PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,250,1000,1000,30,200,2000,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,1,HC,,150,400,400,30,150,1000,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,100,300,300,30,100,500,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,100,300,300,50,300,500,10,100,0,0
AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,1000,1000,1000,100,300,3000,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,1,HC,,200,1000,1000,100,200,3000,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,500,1000,1000,200,500,5000,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,3000,1000,1000,1500,2000,3000,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料点 P1,UpDownAxis_DoorOPosition_P1,304500,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,325300,,,,,,,,,,,,
......@@ -33,6 +33,6 @@ PRO,0,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,,
PRO,0,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,,
PRO,0,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,,,,,,
PRO,0,是否调试状态,ISDebug,0,,,,,,,,,,,,
PRO,,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,,,,,,
PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,, ,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,每次吹气的时间(分钟),BlowAir_Time,10,,,
PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,
......@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed));
moveAxis.TargetPosition = targetPosition;
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed,moveAxis.AddSpeed,moveAxis.DelSpeed);
}
protected bool ACAxisMoveIsEnd(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed, out string msg)
......@@ -245,7 +245,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount +
"],误差过大,重新开始运动,剩余[" + MoveInfo.CanWhileCount + "]次");
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed,moveAxis.AddSpeed,moveAxis.DelSpeed);
MoveInfo.CanWhileCount--;
}
else
......@@ -420,6 +420,16 @@ namespace OnlineStore.DeviceLibrary
}
}
public string GetMoveStr()
{
string msg = "";
msg += "状态: " + storeRunStatus + "\t "+ " " + storeStatus + "\n";
msg += "alarm: " + alarmType + "\n";
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
return msg;
}
public void IOMove(string IoType, IO_VALUE value)
{
IOManager.IOMove(IoType, value, baseConfig.DeviceID);
......
......@@ -11,7 +11,7 @@
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4" />
<!--Server address-->
<add key="http.server" value="http://192.168.101.11/myproject/" />
<!--<add key="http.server" value="http://192.168.101.11/myproject/" />-->
<!--storeType-->
<add key="store_count" value="2" />
<!--start one store config-->
......
......@@ -41,7 +41,7 @@ namespace OnlineStore.ACSingleStore
this.ShowInTaskbar = true;
tabPage2.Text = " 设备[" + boxBean.CID + "]状态 ";
this.Opacity = 1;
DebugStatus(false);
LoadOk = true;
}
private void LoadStore()
......@@ -187,6 +187,8 @@ namespace OnlineStore.ACSingleStore
lblTemp.Text = boxBean.humBean.currTempStr;
lblMoveEquipInfo.Text = "移栽状态:" + (boxBean.lineConnect.CanStartOut() ? "可出库" : "不可出库") + " " + boxBean.lineConnect.LastUpdateTime.ToLongTimeString() + "";
lblThisSta.Text = boxBean.GetRunStr();
lblMoveStr.Text = boxBean.GetMoveStr();
//ReadPosistion();
if (boxBean.storeRunStatus > StoreRunStatus.Wait)
{
......@@ -199,8 +201,6 @@ namespace OnlineStore.ACSingleStore
StoreOpenStatus(true);
}
lblThisSta.Text = boxBean.GetRunStr();
//复位按钮状态显示
if (boxBean.storeRunStatus > StoreRunStatus.Wait)
{
......@@ -243,6 +243,8 @@ namespace OnlineStore.ACSingleStore
lblWarnMsg.Text = msg;
}
}
if (groupBox1.Visible)
{
if (HuichuanLibrary.HCBoardManager.CardInitOk())
{
ReadA(boxBean.Config.Middle_Axis, lblActual1, lblTargetP1, lblTargetP1);
......@@ -250,6 +252,7 @@ namespace OnlineStore.ACSingleStore
ReadA(boxBean.Config.InOut_Axis, lblActual3, lblTargetP3, lblTargetP3);
ReadA(boxBean.Config.Comp_Axis, lblActual4, lblTargetP4, lblTargetP4);
}
}
if (boxBean.autoNext)
{
string msg = boxBean.autoMsg;
......@@ -457,7 +460,7 @@ namespace OnlineStore.ACSingleStore
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.Store_Position_Config);
if (!File.Exists(positionConfigFile))
{
positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.Store_Position_Config, "_" + boxBean.DeviceID.ToString());
positionConfigFile = positionConfigFile.Replace(".csv", "_" + boxBean.DeviceID.ToString()+".csv");
}
bool result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile, ktkPosition);
if (!result)
......@@ -537,7 +540,7 @@ namespace OnlineStore.ACSingleStore
{
LogUtil.info(boxBean.Name + " 点击点位运动:" + moveAxis.DisplayStr + " [" + targetPosition + "] [" + targetSpeed + "] ");
moveAxis.TargetPosition = targetPosition;
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed, moveAxis.AddSpeed, moveAxis.DelSpeed);
}
private void btnUpDownP1_Click(object sender, EventArgs e)
{
......@@ -988,6 +991,7 @@ namespace OnlineStore.ACSingleStore
axisMoveControl1.Enabled = status;
//groupComAxis.Enabled = status;
groupInout.Enabled = status;
axisMoveControl1.Enabled = status;
}
private void btnCon_Click(object sender, EventArgs e)
......@@ -1018,8 +1022,13 @@ namespace OnlineStore.ACSingleStore
txtDOIndex.Text = io.GetIOAddr().ToString();
txtDoName.Text = io.IO_IP;
IOTextControl newControl = DOControlList[io.ProName];
if (selectControl != null) { selectControl.BorderStyle = BorderStyle.None; }
if (selectControl != null)
{
selectControl.BorderStyle = BorderStyle.None;
selectControl.BackColor = Color.White;
}
newControl.BorderStyle = BorderStyle.FixedSingle;
newControl.BackColor = Color.SkyBlue;
selectControl = newControl;
}
}
......@@ -1059,5 +1068,19 @@ namespace OnlineStore.ACSingleStore
boxBean.CloseDoor(false);
}
private void btnOpenD_Click(object sender, EventArgs e)
{
boxBean.OpenDoor(false);
}
private void btnCloseD_Click(object sender, EventArgs e)
{
boxBean.CloseDoor(false);
}
private void lblThisSta_Click(object sender, EventArgs e)
{
}
}
}
......@@ -616,9 +616,12 @@ namespace OnlineStore.ACSingleStore
if (resul.Equals(DialogResult.OK))
{
ACServerManager.instance.CloseCard();
LogUtil.info("打开板卡测试界面前,先CloseCard");
FrmHuiChuanTest frm = new FrmHuiChuanTest();
frm.ShowDialog();
HCLogUtil.logBox = this.logBox;
LogUtil.info("板卡测试界面关闭后,调用OpenCard");
ACServerManager.instance.OpenCard();
}
}
......
......@@ -200,7 +200,7 @@ namespace OnlineStore.ACSingleStore
PositionList = new List<int>();
LogUtil.info(LogName + "伺服开始运动,速度【" + speed + "】位置【" + position + "】启动定时器 ");
formMoveStatus(false);
AxisManager.instance.AbsMove(PortName, SlvAddr, position, speed);
AxisManager.instance.AbsMove(PortName, SlvAddr, position, speed, configAxis.AddSpeed, configAxis.DelSpeed);
toolTimer.Start();
}
private int P3Offset = 0;
......
......@@ -65,6 +65,11 @@ namespace OnlineStore.AutoCountClient
private bool CanMove()
{
if (axis == null)
{
MessageBox.Show("请先选择运动轴", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
//如果是取料升降轴,取料旋转轴,如果进出轴不在待机点,不能运动
if (boxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr)
......@@ -105,7 +110,7 @@ namespace OnlineStore.AutoCountClient
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info(boxBean.Name+"点击【绝对运动】,【" + PortName + "_" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
AxisManager.instance.AbsMove(PortName, SlvAddr, position, speed);
AxisManager.instance.AbsMove(PortName, SlvAddr, position, speed,axis.AddSpeed,axis.DelSpeed);
}
private void btnAxisRMove_Click(object sender, EventArgs e)
......@@ -117,7 +122,7 @@ namespace OnlineStore.AutoCountClient
int position = FormUtil.GetIntValue(txtAPosition);
int speed = FormUtil.GetIntValue(txtASpeed);
LogUtil.info(boxBean.Name+"点击【相对运动】,【" + PortName + "_" + SlvAddr + "】位置【" + position + "】速度【" + speed + "】");
AxisManager.instance.RelMove(PortName, SlvAddr, position, speed);
AxisManager.instance.RelMove(PortName, SlvAddr, position, speed,axis.AddSpeed,axis.DelSpeed);
}
private void btnAxisVMove_Click(object sender, EventArgs e)
......@@ -191,12 +196,13 @@ namespace OnlineStore.AutoCountClient
lblCountPulse.Text = AxisManager.instance.GetActualtPosition(PortName, SlvAddr).ToString();
}
private ConfigMoveAxis axis = null;
private List<Color> colorsList = new List<Color>();
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbAxis.SelectedIndex >= 0)
{
ConfigMoveAxis axis = axisList[cmbAxis.SelectedIndex];
axis = axisList[cmbAxis.SelectedIndex];
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
......
......@@ -51,3 +51,8 @@
20201009
入库时暂不判断是否有料盘
出库时不判断叉子上是否有料盘,待料盘放到仓门口时,如果没有料盘,发送提示信息到服务器,并调用取消任务接口
位置保存问题.
自动复位有问题。
\ No newline at end of file
......@@ -60,7 +60,7 @@ namespace HuichuanLibrary
/// <param name="highVel">回零高速</param>
/// <param name="lowVel">回零低速</param>
/// <param name="acc">回零加速度</param>
/// <param name="homeMethod">回零方法,默认29</param>
/// <param name="homeMethod">回零方法,默认28</param>
/// <param name="offset">回零偏移,默认0</param>
/// <param name="overtime">超时时间,默认120000</param>
/// <param name="posSrc">端子板信号源,默认0</param>
......@@ -81,7 +81,7 @@ namespace HuichuanLibrary
tHomingPara.acc = acc;
tHomingPara.overtime = overtime;
tHomingPara.posSrc = posSrc;
HCLogUtil.info("Axis[" + axisNo + "] StartHoming highVel["+highVel+ "],lowVel[" + lowVel + "],acc[" + acc + "],homeMethod[" + homeMethod + "],offset[" + offset + "],overtime[" + overtime + "],posSrc["+ posSrc + "]");
//【3】开始回原
UInt32 ret = ImcApi.IMC_StartHoming(nCardHandle, axisNo, ref tHomingPara);
if (ret != 0)
......
......@@ -208,8 +208,8 @@ namespace OnlineStore.LoadCSVLibrary
if (array.Length > 0 && array[0].ToString().Equals(ConfigItemType.PRO))
{
string[] newArray = array;
string proName = array[2];
string proValue = array[3];
string proName = array[3];
string proValue = array[4];
if (proName.ToUpper().Contains(BaseConfig.IOIP_Str.ToUpper()))
{
index++;
......@@ -221,7 +221,7 @@ namespace OnlineStore.LoadCSVLibrary
if (prop != null)
{
string newValue = prop.GetValue(newConfig, null).ToString();
newArray[3] = newValue;
newArray[4] = newValue;
}
}
catch (Exception e) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!