Commit d5ca5e2c LN

增加板卡释放

1 个父辈 0817341e
......@@ -29,7 +29,7 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
......
......@@ -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_Down,311,HC,Y311
DO,206,HY6横移电机正转,HY_LineRun,312,HC,Y312
DO,206,HY6前阻挡下降,HY_FrontStopDown,313,HC,Y313
DO,206,HY6阻挡下降,HY_StopDown,314,HC,Y314
DO,206,HY6横移顶升上升,HY_TopCylinder_Up,315,HC,Y315
DO,206,HY6横移顶升下降,HY_TopCylinder_Down,316,HC,Y316
DO,206,HY6横移顶升上升,HY_TopCylinder_Up,313,HC,Y313
DO,206,HY6横移顶升下降,HY_TopCylinder_Down,314,HC,Y314
DO,206,HY6前阻挡下降,HY_FrontStopDown,315,HC,Y315
DO,206,HY6阻挡下降,HY_StopDown,316,HC,Y316
,,,,317,HC,Y317
,,,,318,HC,Y318
,,,,319,HC,Y319
......
......@@ -329,27 +329,22 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
IOMove(axis.Config.ServerOnDO, IO_VALUE.HIGH);
string msg = "";
bool result = axis.Open(isCheck, out msg);
if (result && String.IsNullOrEmpty(msg))
{
IOMove(axis.Config.BreakOnDO, IO_VALUE.HIGH);
return true;
}
SetWarnMsg(Name + msg);
//WarnMsg = DateTime.Now.ToLongTimeString() + " " + Name + msg;
Alarm(LineAlarmType.AxisAlarm);
return false;
}
public void CloseAxis(AxisBean axis)
{
LogUtil.info(Name + "关闭刹车,关闭伺服");
IOMove(axis.Config.BreakOnDO, IO_VALUE.LOW);
LogUtil.info(Name + "关闭伺服 "+axis.AxisName);
axis.ServoOff();
Thread.Sleep(100);
IOMove(axis.Config.ServerOnDO, IO_VALUE.LOW);
}
......
......@@ -448,6 +448,18 @@ namespace HuichuanLibrary
{
CardIsOk = false;
ShowLog("CloseCard OK");
//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;
}
}
......
......@@ -59,14 +59,14 @@ namespace OnlineStore.LoadCSVLibrary
}
public class ConfigMoveAxis : ConfigBase
{
/// <summary>
/// 伺服ON的Do信号
/// </summary>
public string ServerOnDO = "";
/// <summary>
/// 伺服刹车信号
/// </summary>
public string BreakOnDO = "";
///// <summary>
///// 伺服ON的Do信号
///// </summary>
//public string ServerOnDO = "";
///// <summary>
///// 伺服刹车信号
///// </summary>
//public string BreakOnDO = "";
[CSVAttribute("设备名称")]
public string DeviceName { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!