Commit d6e1948b LN

bug修改

1 个父辈 1a36baf0
此文件类型无法预览
...@@ -299,6 +299,7 @@ namespace OnlineStore.AssemblyLine ...@@ -299,6 +299,7 @@ namespace OnlineStore.AssemblyLine
lblAxEncVel.Text = HCBoardManager.GetAxisCurrVel(axisNo).ToString(); lblAxEncVel.Text = HCBoardManager.GetAxisCurrVel(axisNo).ToString();
lblAxEncAcc.Text = HCBoardManager.GetAxisCurrAcc(axisNo).ToString(); lblAxEncAcc.Text = HCBoardManager.GetAxisCurrAcc(axisNo).ToString();
//label65.Text = nTimerAxEncAcc[0].ToString(); //label65.Text = nTimerAxEncAcc[0].ToString();
txtAxisPosition.Text = lblAxEncPos.Text;
short value = HCBoardManager.GetHomeStatus(axisNo); short value = HCBoardManager.GetHomeStatus(axisNo);
string homesstr = HCBoardManager.AxisHomeSts(value); string homesstr = HCBoardManager.AxisHomeSts(value);
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,出力,距离 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,出力,距离
CLAW,1,移栽D1_夹爪,CLAW_D1,0,COM1,,500,500,500,30,7 CLAW,1,移栽D1_夹爪,CLAW_D1,0,COM13,,500,500,500,30,7
CLAW,2,移栽D2_夹爪,CLAW_D2,1,COM1,,500,500,500,30,7 CLAW,2,移栽D2_夹爪,CLAW_D2,1,COM13,,500,500,500,30,7
CLAW,3,移栽D3_夹爪,CLAW_D3,2,COM1,,500,500,500,30,7 CLAW,3,移栽D3_夹爪,CLAW_D3,2,COM13,,500,500,500,30,7
CLAW,4,移栽D4_夹爪,CLAW_D4,3,COM1,,500,500,500,30,7 CLAW,4,移栽D4_夹爪,CLAW_D4,3,COM13,,500,500,500,30,7
CLAW,5,移栽D5_夹爪,CLAW_D5,0,COM2,,500,500,500,30,7 CLAW,5,移栽D5_夹爪,CLAW_D5,0,COM12,,500,500,500,30,7
CLAW,6,移栽D6_夹爪,CLAW_D6,1,COM2,,500,500,500,30,7 CLAW,6,移栽D6_夹爪,CLAW_D6,1,COM12,,500,500,500,30,7
CLAW,7,移栽D7_夹爪,CLAW_D7,2,COM2,,500,500,500,30,7 CLAW,7,移栽D7_夹爪,CLAW_D7,2,COM12,,500,500,500,30,7
CLAW,101,上料模块T1夹爪,CLAW_T1,3,COM2,,500,500,500,30,7 CLAW,101,上料模块T1夹爪,CLAW_T1,3,COM12,,500,500,500,30,7
,,,,,,,,,,, ,,,,,,,,,,,
,,,,,,,,,,, ,,,,,,,,,,,
,,,,,,,,,,, ,,,,,,,,,,,
......
...@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
{ {
public class AgvClient public class AgvClient
{ {
public static bool CurrCancelState = false ; public static bool CurrCancelState = true ;
private static string ServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp); private static string ServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp);
private static Asa.AgvClient agvClient; private static Asa.AgvClient agvClient;
public static Dictionary<string, Asa.ClientAction> actionMap = new Dictionary<string, Asa.ClientAction>(); public static Dictionary<string, Asa.ClientAction> actionMap = new Dictionary<string, Asa.ClientAction>();
......
...@@ -35,7 +35,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,7 +35,7 @@ namespace OnlineStore.DeviceLibrary
bool result = rmaxis.OpenPort(config.PortName, config.AxisNo); bool result = rmaxis.OpenPort(config.PortName, config.AxisNo);
if (!result) if (!result)
{ {
LogUtil.error(Name + " OpenPort 失败:" ); LogUtil.error(Name + " OpenPort 失败:"+rmaxis.ErrorCode );
} }
} }
return rmaxis.IsPortOpen; return rmaxis.IsPortOpen;
......
...@@ -66,27 +66,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -66,27 +66,34 @@ namespace OnlineStore.DeviceLibrary
return IO_VALUE.None; return IO_VALUE.None;
} }
IO_VALUE ioValue = IO_VALUE.None; IO_VALUE ioValue = IO_VALUE.None;
ConfigIO configIo = GetDI(ioType, subType); try
if (configIo == null)
{ {
configIo = GetDO(ioType, subType);
}
if (configIo != null) ConfigIO configIo = GetDI(ioType, subType);
{ if (configIo == null)
if (configIo.ProType.Equals(ConfigItemType.DI))
{ {
configIo = GetDO(ioType, subType);
}
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); if (configIo != null)
{
if (configIo.ProType.Equals(ConfigItemType.DI))
{
ioValue = instance.GetDIValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
else
{
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr());
}
} }
else else
{ {
ioValue = instance.GetDOValue(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr()); IOErrorLog(ioType, subType, "IO");
} }
} }catch(Exception ex)
else
{ {
IOErrorLog(ioType, subType, "IO"); LogUtil.error("IOValue Error: " + ex.ToString());
} }
return ioValue; return ioValue;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!