Commit ae2be12f LN

iodll更新

1 个父辈 b0293b59
......@@ -65,37 +65,28 @@ namespace OnlineStore.DeviceLibrary
{
DOValueMap.Remove(ioIp);
}
int DIMS = ConfigAppSettings.GetIntValue("DIMS");
if (DIMS < 20)
{
DIMS = 20;
}
int DOMS = ConfigAppSettings.GetIntValue("DOMS");
if (DOMS < 200)
{
DOMS = 200;
}
int DILength = RobotManager.Config.GetDILength(ioIp);
int DOLength = RobotManager.Config.GetDOLength(ioIp);
string logName = "IO模块[" + ioIp + "] DI[" + DILength + "] DO[" + DOLength + "],[" + DIMS + "] [" + DOMS + "]";
string logName = "IO模块[" + ioIp + "] DI[" + DILength + "] DO[" + DOLength + "] ";
try
{
aioBox = new AIOBOX();
aioBox.LogPath(Application.StartupPath + @"\logs\aio\", LogType.OnlyError);
aioBox.IP = ioIp;
aioBox.SetInput(Asa.IOModule.Box_Type.DI, DILength);
aioBox.SetOutput(Asa.IOModule.Box_Type.DO, DOLength);
//DI主动上传
aioBox.AutoReadInput(true);
aioBox.AutoReadOutput(false, DOMS);
{
//aioBox = new AIOBOX();
//aioBox.LogPath(Application.StartupPath + @"\logs\aio\", LogType.OnlyError);
//aioBox.IP = ioIp;
//aioBox.SetInput(Asa.IOModule.Box_Type.DI, DILength);
//aioBox.SetOutput(Asa.IOModule.Box_Type.DO, DOLength);
////DI主动上传
//aioBox.AutoReadInput(true);
//aioBox.AutoReadOutput(false, DOMS);
aioBox = new AIOBOX(Asa.IOModule.Box_Type.DI, DILength, Asa.IOModule.Box_Type.DO, DOLength);
aioBox.IP = ioIp;
aioBox.DI_Changed_Event += AioBox_DI_Changed_Event; ;
aioBox.DO_Changed_Event += AioBox_DO_Changed_Event;
LogUtil.info("开始连接:" + logName + ":" + aioBox.ErrInfo);
LogUtil.info("开始连接:" + logName + ":" );
aioBox.Connect();
AIOMap.Add(ioIp, aioBox);
......@@ -263,7 +254,7 @@ namespace OnlineStore.DeviceLibrary
bool result = aioBox.WriteDO(StartAddress, GetBox_Sta(onOff));
if (!result)
{
LogUtil.error("AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 失败:" + aioBox.ErrInfo);
LogUtil.error("AIO WriteSingleDO [" + ioIp + "] [" + StartAddress + "] 失败:" );
}
}
else
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!