Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 86f90bf4
由
LN
编写于
2020-05-07 09:13:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
dee11770
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
101 行增加
和
43 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/ResourceCulture.cs
source/ACSingleStore/resource/language.resource
source/DeviceLibrary/ResourceControl.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/KTK_DeviceBase.cs
source/DeviceLibrary/store/StoreStep.cs
墨西哥料仓.txt
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
86f90bf
...
...
@@ -1093,7 +1093,7 @@ namespace OnlineStore.ACSingleStore
}
else
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
App_AutoRun
,
0
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
UseBuzzer
,
0
);
store
.
UseBuzzer
=
false
;
LogUtil
.
info
(
"去掉:启用蜂鸣器"
);
}
...
...
source/ACSingleStore/ResourceCulture.cs
查看文件 @
86f90bf
...
...
@@ -42,7 +42,7 @@ namespace OnlineStore
LoadData
();
}
}
private
static
char
spilt
=
','
;
private
static
char
spilt
=
','
;
private
static
void
LoadData
()
{
ResourceControl
.
GetChinaStringEvent
+=
GetChinaString
;
...
...
@@ -51,12 +51,12 @@ namespace OnlineStore
ResourceControl
.
GetStringEvent
+=
GetString
;
CSVResourceControl
.
GetStrEvent
+=
GetString
;
CSVResourceControl
.
GetStringEvent
+=
GetString
;
// CodeLibrary.CodeResourceControl.GetLanguageEvent += CodeResourceControl_GetLanguageEvent;
// CodeLibrary.CodeResourceControl.GetLanguageEvent += CodeResourceControl_GetLanguageEvent;
//string englishPath = Application.StartupPath + @"\resource\en-US.resource";
//string chinaPath = Application.StartupPath + @"\resource\zh-CN.resource";
//Dictionary<string, string> ChinaMap = LoadDataMap(chinaPath);
//Dictionary<string, string> EnglishMap = LoadDataMap(englishPath);
string
rPath
=
Application
.
StartupPath
+
@"\resource\language.resource"
;
string
rPath
=
Application
.
StartupPath
+
@"\resource\language.resource"
;
ResourceMap
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
Dictionary
<
string
,
string
>
ChinaMap
=
new
Dictionary
<
string
,
string
>();
Dictionary
<
string
,
string
>
EnglishMap
=
new
Dictionary
<
string
,
string
>();
...
...
@@ -82,15 +82,31 @@ namespace OnlineStore
{
eng
=
array
[
2
].
Replace
(
'&'
,
','
).
Trim
();
}
ChinaMap
.
Add
(
key
,
china
);
if
(
ChinaMap
.
ContainsKey
(
key
))
{
ChinaMap
[
key
]
=
china
;
}
else
{
ChinaMap
.
Add
(
key
,
china
);
}
if
(
String
.
IsNullOrEmpty
(
eng
).
Equals
(
false
))
{
EnglishMap
.
Add
(
key
,
eng
);
if
(
EnglishMap
.
ContainsKey
(
key
))
{
EnglishMap
[
key
]
=
eng
;
}
else
{
EnglishMap
.
Add
(
key
,
eng
);
}
// EnglishMap.Add(key, eng);
}
}
}
catch
(
Exception
ex
)
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"读取文件【"
+
rPath
+
"】【"
+
line
+
"】出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"读取文件【"
+
rPath
+
"】【"
+
line
+
"】出错:"
+
ex
.
ToString
());
}
}
}
...
...
@@ -123,7 +139,7 @@ namespace OnlineStore
EnglishMap
.
Add
(
key
,
englistr
);
}
}
string
str
=
key
+
spilt
+
chinastr
.
Replace
(
spilt
,
'&'
)
+
spilt
+
englistr
.
Replace
(
spilt
,
'&'
);
string
str
=
key
+
spilt
+
chinastr
.
Replace
(
spilt
,
'&'
)
+
spilt
+
englistr
.
Replace
(
spilt
,
'&'
);
allList
.
Add
(
str
);
}
if
(
isNeedUpE
)
...
...
@@ -148,17 +164,17 @@ namespace OnlineStore
//FileUtil.SaveListToFile(allList.ToArray(), Application.StartupPath + "\\a.txt");
}
private
static
Dictionary
<
string
,
string
>
LoadRMap
()
private
static
Dictionary
<
string
,
string
>
LoadRMap
()
{
string
path
=
Application
.
StartupPath
+
@"\resource\ResourceMap.csv"
;
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
try
{
if
(!
File
.
Exists
(
path
))
{
{
return
map
;
}
string
[]
lines
=
File
.
ReadAllLines
(
path
);
string
[]
lines
=
File
.
ReadAllLines
(
path
);
foreach
(
string
line
in
lines
)
{
if
(
String
.
IsNullOrEmpty
(
line
))
...
...
@@ -170,18 +186,24 @@ namespace OnlineStore
{
if
(
array
.
Length
>=
3
)
{
map
.
Add
(
array
[
1
].
Replace
(
'&'
,
','
).
Trim
(),
array
[
2
].
Replace
(
'&'
,
','
).
Trim
());
string
key
=
array
[
1
].
Replace
(
'&'
,
','
).
Trim
();
string
value
=
array
[
2
].
Replace
(
'&'
,
','
).
Trim
();
if
(
map
.
ContainsKey
(
key
))
{
map
[
key
]
=
value
;
}
else
{
map
.
Add
(
key
,
value
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"加载 "
+
path
+
"["
+
line
+
"] 出错:"
+
ex
.
ToString
());
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"加载 "
+
path
+
" 出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"加载 "
+
path
+
" 出错:"
+
ex
.
ToString
());
}
return
map
;
}
...
...
@@ -244,14 +266,14 @@ namespace OnlineStore
public
static
string
GetChinaString
(
string
id
,
params
object
[]
param
)
{
string
strCurLanguage
=
gets
(
China
,
id
);
return
String
.
Format
(
strCurLanguage
,
param
);
return
String
.
Format
(
strCurLanguage
,
param
);
}
public
static
string
GetEnglishString
(
string
id
,
params
object
[]
param
)
{
{
string
strCurLanguage
=
gets
(
English
,
id
);
return
String
.
Format
(
strCurLanguage
,
param
);
return
String
.
Format
(
strCurLanguage
,
param
);
}
private
static
string
gets
(
string
language
,
string
id
,
string
defaultStr
=
""
)
private
static
string
gets
(
string
language
,
string
id
,
string
defaultStr
=
""
)
{
if
(
String
.
IsNullOrEmpty
(
defaultStr
))
{
...
...
@@ -273,21 +295,22 @@ namespace OnlineStore
{
if
(
ResourceMap
[
language
].
ContainsKey
(
id
.
Trim
()))
{
return
ResourceMap
[
language
][
id
];
return
ResourceMap
[
language
][
id
];
}
else
{
NoIdLog
(
id
,
defaultStr
);
}
}
}
}
}
catch
(
Exception
ex
)
{
NoIdLog
(
id
,
defaultStr
);
}
return
defaultStr
;
}
return
defaultStr
;
}
public
static
string
GetString
(
string
id
,
string
defaultStr
=
""
)
public
static
string
GetString
(
string
id
,
string
defaultStr
=
""
)
{
string
strCurLanguage
=
defaultStr
;
if
(
string
.
IsNullOrEmpty
(
defaultStr
))
...
...
@@ -356,8 +379,8 @@ namespace OnlineStore
foreach
(
string
key
in
defaultMap
.
Keys
)
{
string
value
=
defaultMap
[
key
];
LogUtil
.
info
(
""
+
key
+
spilt
+
value
+
spilt
+
""
);
LogUtil
.
RLog
(
""
+
key
+
spilt
+
value
.
Replace
(
spilt
,
'&'
)
+
spilt
+
""
);
LogUtil
.
info
(
""
+
key
+
spilt
+
value
+
spilt
+
""
);
LogUtil
.
RLog
(
""
+
key
+
spilt
+
value
.
Replace
(
spilt
,
'&'
)
+
spilt
+
""
);
}
LogUtil
.
info
(
"结束打印缺少的文字配置"
);
...
...
@@ -394,7 +417,7 @@ namespace OnlineStore
string
showMsg
=
ResourceCulture
.
GetString
(
msg
,
msg
,
param
);
string
showTitle
=
ResourceCulture
.
GetString
(
"提示"
);
return
MessageBox
.
Show
(
showMsg
,
showTitle
);
return
MessageBox
.
Show
(
showMsg
,
showTitle
);
}
public
static
DialogResult
Show
(
string
msg
,
string
title
,
MessageBoxButtons
but
,
params
object
[]
param
)
{
...
...
source/ACSingleStore/resource/language.resource
查看文件 @
86f90bf
...
...
@@ -299,4 +299,17 @@ trayHeight,料盘高度,Reel height,
左侧门未关,左侧门未关,Left door open
右侧门未关,右侧门未关,Right door open
FrmStoreBox_chbIsDebug_Text,调试状态,debug mode
光栅被遮挡,光栅被遮挡,Grating blocked
\ No newline at end of file
光栅被遮挡,光栅被遮挡,Grating blocked
InTrouble,故障中,In trouble
OutStoreBoxEnd,料盘出仓位完成,Providing executed
OutStoreExecute,出库执行中,Providing Executing
StoreOnline,设备联机,System online
SuddenStop,急停中,Emerengy stop
OutMoveExecute,出库完成,Providing Executed
InStoreFailed,入库失败,Saving failed
OutStoreFailed,出库失败,Providing failed
WaitSingle,等待信号,Wait signal
TimeOut,超时,Time out
Run,运行中,Runing
Runing,运行中,Runing
OutStorEnd,出库完成,OutStorEnd
\ No newline at end of file
source/DeviceLibrary/ResourceControl.cs
查看文件 @
86f90bf
...
...
@@ -389,5 +389,9 @@ namespace OnlineStore.DeviceLibrary
/// 批量轴已满,请取出料盘
/// </summary>
public
static
string
OutFull
=
"OutFull"
;
/// <summary>
/// 出库完成
/// </summary>
public
static
string
OutStorEnd
=
"OutStorEnd"
;
}
}
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
86f90bf
...
...
@@ -864,7 +864,7 @@ namespace OnlineStore.DeviceLibrary
return
;
}
if
(
UseBuzzer
)
if
(
!
UseBuzzer
)
{
IOManager
.
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
LOW
);
}
...
...
@@ -1854,7 +1854,7 @@ namespace OnlineStore.DeviceLibrary
{
boxStatus
.
msg
=
CodeMsg
;
boxStatus
.
msgEn
=
CodeMsgEn
;
// lineOperation.msg = CodeMsg;
// lineOperation.msg = CodeMsg;
lineOperation
.
msg
=
CodeMsg
;
lineOperation
.
msgEn
=
CodeMsgEn
;
}
...
...
@@ -1905,6 +1905,11 @@ namespace OnlineStore.DeviceLibrary
{
lineOperation
.
alarmList
.
Add
(
alarmInfo
);
}
if
(
lineOperation
.
data
==
null
)
{
lineOperation
.
data
=
new
Dictionary
<
string
,
string
>();
}
lineOperation
.
data
.
Add
(
IO_Type
.
TrayCheck_Door
,
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
ToString
());
return
lineOperation
;
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
86f90bf
...
...
@@ -710,10 +710,8 @@ namespace OnlineStore.DeviceLibrary
{
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_GoBack
);
OutStoreLog
(
"出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoorAndWait
();
SO_14_GoBack
();
}
else
{
...
...
@@ -724,10 +722,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_13_CheckTray
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_GoBack
);
OutStoreLog
(
"出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoorAndWait
();
SO_14_GoBack
();
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_GoBack
)
{
...
...
@@ -761,6 +756,21 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SO_14_GoBack
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_GoBack
);
OutStoreLog
(
"出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门,更改状态为出库完成"
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoorAndWait
();
//改为出库完成
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
OutStorEnd
;
storeStatus
=
StoreStatus
.
OutStorEnd
;
}
private
void
SO_10_DeviceToDoorPro
()
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
...
...
source/DeviceLibrary/store/KTK_DeviceBase.cs
查看文件 @
86f90bf
...
...
@@ -161,8 +161,8 @@ namespace OnlineStore.DeviceLibrary
case
StoreStatus
.
InStoreFaild
:
aa
=
ResourceControl
.
GetString
(
ResourceControl
.
InStoreFailed
,
"入库失败"
)
+
"("
+
WarnObj
.
WarnMsg
+
")"
;
break
;
case
StoreStatus
.
OutStor
eFail
d
:
aa
=
ResourceControl
.
GetString
(
ResourceControl
.
OutStor
eFailed
,
"出库失败
"
)
+
"("
+
WarnObj
.
WarnMsg
+
")"
;
case
StoreStatus
.
OutStor
En
d
:
aa
=
ResourceControl
.
GetString
(
ResourceControl
.
OutStor
End
,
"出库完成
"
)
+
"("
+
WarnObj
.
WarnMsg
+
")"
;
break
;
}
if
(!
String
.
IsNullOrEmpty
(
aa
))
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
86f90bf
...
...
@@ -93,13 +93,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
OutStoreBoxEnd
=
10
,
/// <summary>
///
12=移栽出库移栽过程中(移栽完成后变成OnLine)
///
11=出库完成
/// </summary>
Out
MoveExecute
=
12
,
Out
StorEnd
=
11
,
/// <summary>
///
11=出库失败
///
12=移栽出库移栽过程中(移栽完成后变成OnLine)
/// </summary>
Out
StoreFaild
=
11
,
Out
MoveExecute
=
12
,
/// <summary>
/// 重置中(原点返回和重置都发此状态)
/// </summary>
...
...
墨西哥料仓.txt
0 → 100644
查看文件 @
86f90bf
SISO料仓9台
datalogic版本,增加照明DO,门打开时自动打开照明。
DIDO定义修改。
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论