Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 68e56f25
由
LN
编写于
2019-11-12 21:53:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
io修改
1 个父辈
561968aa
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
12 行增加
和
55 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/positionTool/FrmPositionTool.cs
source/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/LoadCVSLibrary/storeConfig/config/StoreConfig.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
68e56f2
...
...
@@ -1455,7 +1455,7 @@ namespace OnlineStore.ACSingleStore
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
if
(
store
.
Config
.
StoreDIList
.
ContainsKey
(
IO_Type
.
TrayCheck_Fixture
))
{
ioIP
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
DeviceName
;
ioIP
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
IO_IP
;
ioIndex
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
GetIOAddr
();
}
FrmPositionTool
frm
=
new
FrmPositionTool
(
PortName
,
slvAddr
,
ioIP
,
ioIndex
);
...
...
source/ACSingleStore/positionTool/FrmPositionTool.cs
查看文件 @
68e56f2
...
...
@@ -35,7 +35,7 @@ namespace OnlineStore.ACSingleStore
this
.
IoIndex
=
ioIndex
;
toolTimer
.
Enabled
=
false
;
toolTimer
.
Interval
=
10
0
;
toolTimer
.
Interval
=
5
0
;
toolTimer
.
AutoReset
=
true
;
toolTimer
.
Elapsed
+=
ToolTimer_Elapsed
;
...
...
@@ -187,7 +187,7 @@ namespace OnlineStore.ACSingleStore
string
filePath
=
Application
.
StartupPath
+
@"\logs\"
+
fileName
;
if
(
File
.
Exists
(
filePath
))
{
string
msg
=
"文件【
{0}
】已存在,是否确定覆盖?"
;
string
msg
=
"文件【
"
+
fileName
+
"
】已存在,是否确定覆盖?"
;
DialogResult
result
=
MessageBox
.
Show
(
msg
,
""
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
Question
);
if
(!
result
.
Equals
(
DialogResult
.
OK
))
{
...
...
source/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
68e56f2
...
...
@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
aioBox
.
SetInput
(
Asa
.
IOModule
.
Box_Type
.
DI
,
DILength
);
aioBox
.
SetOutput
(
Asa
.
IOModule
.
Box_Type
.
DO
,
DOLength
);
//DI主动上传
aioBox
.
AutoReadInput
(
true
);
aioBox
.
AutoReadInput
(
true
,
DIMS
);
aioBox
.
AutoReadOutput
(
true
,
DOMS
);
aioBox
.
LogOut
=
true
;
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
68e56f2
...
...
@@ -34,19 +34,7 @@ namespace OnlineStore.LoadCSVLibrary
[
CSVAttribute
(
"属性值"
)]
public
string
ProValue
{
get
;
set
;
}
public
ushort
GetIOAddr
()
{
ushort
value
=
0
;
try
{
value
=
(
ushort
)
Convert
.
ToInt32
(
ProValue
);
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"出错:"
,
ex
);
}
return
value
;
}
public
virtual
int
GetValue
()
{
if
(
ProValue
.
Equals
(
""
))
...
...
@@ -271,49 +259,18 @@ namespace OnlineStore.LoadCSVLibrary
{
}
}
public
override
int
GetValue
()
{
return
GetIOValue
();
}
public
int
GetIOValue
()
public
ushort
GetIOAddr
()
{
if
(
IoValue
>=
-
1
)
{
return
IoValue
;
}
ushort
value
=
0
;
try
{
if
(
ProValue
.
Equals
(
""
)
||
ProValue
.
Equals
(
"-1"
))
{
IoValue
=
-
1
;
}
else
if
(
ProType
.
Equals
(
ConfigItemType
.
DI
))
{
IoValue
=
Convert
.
ToInt32
(
ProValue
,
8
);
}
else
if
(
ProType
.
Equals
(
ConfigItemType
.
DO
))
{
if
(
ProValue
.
Length
==
2
)
{
int
a
=
Convert
.
ToInt32
(
ProValue
.
Substring
(
0
,
1
),
16
)
-
8
;
string
str
=
a
+
ProValue
.
Substring
(
1
,
1
);
IoValue
=
Convert
.
ToInt32
(
str
,
8
);
//IoValue = a + b;
}
else
{
IoValue
=
Convert
.
ToInt32
(
ProValue
,
16
)
-
Convert
.
ToInt32
(
"80"
,
16
);
}
}
//LOGGER.Info("IO转换:(" + ElectricalDefinition + ")" + ProVale + "=" + IoValue);
value
=
(
ushort
)
Convert
.
ToInt32
(
ProValue
);
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"出错了:"
,
ex
);
return
-
1
;
LOGGER
.
Error
(
"出错:"
,
ex
);
}
return
IoV
alue
;
return
v
alue
;
}
public
override
string
ToString
()
...
...
source/LoadCVSLibrary/storeConfig/config/StoreConfig.cs
查看文件 @
68e56f2
...
...
@@ -138,7 +138,7 @@ namespace OnlineStore.LoadCSVLibrary
if
(
IO_Type
.
GetTypeList
().
Contains
(
con
.
ProName
))
{
ConfigIO
io
=
(
ConfigIO
)
con
;
if
(!
DIODeviceNameList
.
Contains
(
io
.
DeviceName
)
&&
(
io
.
GetIO
Value
()
>=
0
||
io
.
GetIOAddr
()
>=
0
)&&
io
.
DeviceName
.
Contains
(
IOIP_Str
).
Equals
(
false
))
if
(!
DIODeviceNameList
.
Contains
(
io
.
DeviceName
)
&&
(
io
.
GetIO
Addr
()
>=
0
||
io
.
GetIOAddr
()
>=
0
)&&
io
.
DeviceName
.
Contains
(
IOIP_Str
).
Equals
(
false
))
{
DIODeviceNameList
.
Add
(
io
.
DeviceName
);
}
...
...
@@ -154,7 +154,7 @@ namespace OnlineStore.LoadCSVLibrary
if
(
IO_Type
.
GetTypeList
().
Contains
(
con
.
ProName
))
{
ConfigIO
io
=
(
ConfigIO
)
con
;
if
(!
DIODeviceNameList
.
Contains
(
io
.
DeviceName
)
&&
io
.
GetIO
Value
()
>=
0
&&
io
.
DeviceName
.
Contains
(
IOIP_Str
).
Equals
(
false
))
if
(!
DIODeviceNameList
.
Contains
(
io
.
DeviceName
)
&&
io
.
GetIO
Addr
()
>=
0
&&
io
.
DeviceName
.
Contains
(
IOIP_Str
).
Equals
(
false
))
{
DIODeviceNameList
.
Add
(
io
.
DeviceName
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论