Commit d5ca5e2c LN

增加板卡释放

1 个父辈 0817341e
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
......
...@@ -764,10 +764,10 @@ DO,4,D2-2夹料放松,ClampCylinder_Relax,309,HC,Y309 ...@@ -764,10 +764,10 @@ DO,4,D2-2夹料放松,ClampCylinder_Relax,309,HC,Y309
DO,4,D2-2升降上升,UpDownCylinder_Up,310,HC,Y310 DO,4,D2-2升降上升,UpDownCylinder_Up,310,HC,Y310
DO,4,D2-2升降下降,UpDownCylinder_Down,311,HC,Y311 DO,4,D2-2升降下降,UpDownCylinder_Down,311,HC,Y311
DO,206,HY6横移电机正转,HY_LineRun,312,HC,Y312 DO,206,HY6横移电机正转,HY_LineRun,312,HC,Y312
DO,206,HY6前阻挡下降,HY_FrontStopDown,313,HC,Y313 DO,206,HY6横移顶升上升,HY_TopCylinder_Up,313,HC,Y313
DO,206,HY6阻挡下降,HY_StopDown,314,HC,Y314 DO,206,HY6横移顶升下降,HY_TopCylinder_Down,314,HC,Y314
DO,206,HY6横移顶升上升,HY_TopCylinder_Up,315,HC,Y315 DO,206,HY6前阻挡下降,HY_FrontStopDown,315,HC,Y315
DO,206,HY6横移顶升下降,HY_TopCylinder_Down,316,HC,Y316 DO,206,HY6阻挡下降,HY_StopDown,316,HC,Y316
,,,,317,HC,Y317 ,,,,317,HC,Y317
,,,,318,HC,Y318 ,,,,318,HC,Y318
,,,,319,HC,Y319 ,,,,319,HC,Y319
......
...@@ -328,28 +328,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -328,28 +328,23 @@ namespace OnlineStore.DeviceLibrary
if (!UseAxis) if (!UseAxis)
{ {
return true; return true;
} }
IOMove(axis.Config.ServerOnDO, IO_VALUE.HIGH);
string msg = ""; string msg = "";
bool result = axis.Open(isCheck, out msg); bool result = axis.Open(isCheck, out msg);
if (result && String.IsNullOrEmpty(msg)) if (result && String.IsNullOrEmpty(msg))
{ {
IOMove(axis.Config.BreakOnDO, IO_VALUE.HIGH);
return true; return true;
} }
SetWarnMsg(Name + msg); SetWarnMsg(Name + msg);
//WarnMsg = DateTime.Now.ToLongTimeString() + " " + Name + msg;
Alarm(LineAlarmType.AxisAlarm); Alarm(LineAlarmType.AxisAlarm);
return false; return false;
} }
public void CloseAxis(AxisBean axis) public void CloseAxis(AxisBean axis)
{ {
LogUtil.info(Name + "关闭刹车,关闭伺服"); LogUtil.info(Name + "关闭伺服 "+axis.AxisName);
IOMove(axis.Config.BreakOnDO, IO_VALUE.LOW);
axis.ServoOff(); axis.ServoOff();
Thread.Sleep(100); Thread.Sleep(100);
IOMove(axis.Config.ServerOnDO, IO_VALUE.LOW);
} }
......
...@@ -448,8 +448,20 @@ namespace HuichuanLibrary ...@@ -448,8 +448,20 @@ namespace HuichuanLibrary
{ {
CardIsOk = false; CardIsOk = false;
ShowLog("CloseCard OK"); ShowLog("CloseCard OK");
return true; //return true;
}
ret = ImcApi.IMC_CloseCardHandle(nCardHandle);
if (ret != 0)
{
ShowErrorLog("CloseCardHandle FAIL, ErrorCode=0x" + ret.ToString("x8"));
return false;
} }
else
{
CardIsOk = false;
ShowLog("CloseCardHandle OK");
return true;
}
} }
/// <summary> /// <summary>
/// 板卡是否已经初始化OK /// 板卡是否已经初始化OK
......
...@@ -59,14 +59,14 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -59,14 +59,14 @@ namespace OnlineStore.LoadCSVLibrary
} }
public class ConfigMoveAxis : ConfigBase public class ConfigMoveAxis : ConfigBase
{ {
/// <summary> ///// <summary>
/// 伺服ON的Do信号 ///// 伺服ON的Do信号
/// </summary> ///// </summary>
public string ServerOnDO = ""; //public string ServerOnDO = "";
/// <summary> ///// <summary>
/// 伺服刹车信号 ///// 伺服刹车信号
/// </summary> ///// </summary>
public string BreakOnDO = ""; //public string BreakOnDO = "";
[CSVAttribute("设备名称")] [CSVAttribute("设备名称")]
public string DeviceName { get; set; } public string DeviceName { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!