Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO1196_X800
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a442e639
由
刘韬
编写于
2023-03-15 13:24:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
灯塔修复, 和长按复位按钮回原
1 个父辈
23fd5636
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
94 行增加
和
60 行删除
Common/Common.csproj
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/app.config
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Counting.cs
DeviceLibrary/theMachine/MainMachine_OutMove.cs
LoadCVSLibrary/LoadCSVLibrary.csproj
TheMachine/App.config
TheMachine/Properties/Resources.Designer.cs
TheMachine/Properties/Settings.Designer.cs
TheMachine/TheMachine.csproj
Common/Common.csproj
查看文件 @
a442e63
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>MyCommon</AssemblyName>
<TargetFrameworkVersion>v4.
6.1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
8
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
a442e63
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.
7.1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
8
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
...
...
DeviceLibrary/app.config
查看文件 @
a442e63
...
...
@@ -8,4 +8,4 @@
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
7.1
"
/></
startup
></
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
8
"
/></
startup
></
configuration
>
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
a442e63
...
...
@@ -121,8 +121,8 @@ namespace DeviceLibrary
{
islog
=
true
;
var
datetime
=
DateTime
.
Now
;
string
countfile
=
$
"\\
XrayLogs
\\{datetime:yyyyMMdd_HHmmss}_{QTY}.csv"
;
Directory
.
CreateDirectory
(
"\\
XrayLogs
\\"
);
string
countfile
=
$
"\\
LogData
\\{datetime:yyyyMMdd_HHmmss}_{QTY}.csv"
;
Directory
.
CreateDirectory
(
"\\
LogData
\\"
);
if
(!
File
.
Exists
(
countfile
))
{
StreamWriter
sw1
=
new
StreamWriter
(
countfile
,
true
,
Encoding
.
GetEncoding
(
"GB2312"
));
...
...
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
查看文件 @
a442e63
...
...
@@ -108,7 +108,7 @@ namespace DeviceLibrary
foreach
(
var
ledcolor
in
ledcfg
.
Keys
)
{
if
(
ledcfg
[
ledcolor
]
==
LedState
.
none
)
return
;
continue
;
Led
.
LedColors
[
ledcolor
].
LedState
=
ledcfg
[
ledcolor
];
}
}
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
a442e63
...
...
@@ -125,6 +125,7 @@ namespace DeviceLibrary
IOMonitor
.
RegisterIO
(
IO_Type
.
Reset_BTN
,
Config
,
IO_VALUE
.
HIGH
,
Reset_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
AutoRun_Single
,
Config
,
IO_VALUE
.
HIGH
,
Run_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
Reset_BTN
,
Config
,
IO_VALUE
.
HIGH
,
HomeReset_BTN
,
2500
,
3000
);
LedProcessInit
();
LogUtil
.
info
(
"LedProcess Init pass"
);
IOManager
.
IOMove
(
IO_Type
.
Counting_Camera_Led
,
IO_VALUE
.
HIGH
);
...
...
@@ -132,6 +133,23 @@ namespace DeviceLibrary
IOManager
.
IOMove
(
IO_Type
.
Unloading_Device_Led
,
IO_VALUE
.
HIGH
);
}
void
HomeReset_BTN
()
{
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
crc
.
GetString
(
"Res0009"
,
"按下复位按钮."
),
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
}
else
{
Msg
.
add
(
crc
.
GetString
(
"Res0010"
,
"急停未解除,按下复位按钮尝试复位安全继电器."
),
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
}
if
(
RobotManage
.
isRunning
)
{
LogUtil
.
info
(
"长按下复位按钮,系统正在运行,开始复位"
);
BeginHomeReset
();
}
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
}
private
(
bool
,
string
)
Unloading_Middle_Axis_interference
(
int
from
,
int
to
)
{
...
...
DeviceLibrary/theMachine/MainMachine_Counting.cs
查看文件 @
a442e63
...
...
@@ -148,6 +148,22 @@ namespace DeviceLibrary
var
pn
=
Regex
.
Match
(
hc
,
"@@(AT\\w*)@@"
).
Groups
[
1
].
Value
;
CountMoveInfo
.
MoveParam
.
PN
=
pn
;
}
else
{
hc
=
CountMoveInfo
.
MoveParam
.
codeInfos
.
Where
(
c
=>
Regex
.
IsMatch
(
c
.
CodeStr
,
@";(AT[\w]*);"
)).
FirstOrDefault
()?.
CodeStr
;
if
(!
string
.
IsNullOrEmpty
(
hc
))
{
var
pn
=
Regex
.
Match
(
hc
,
@";(AT[\w]*);"
).
Groups
[
1
].
Value
;
CountMoveInfo
.
MoveParam
.
PN
=
pn
;
}
else
{
hc
=
CountMoveInfo
.
MoveParam
.
codeInfos
.
Where
(
c
=>
Regex
.
IsMatch
(
c
.
CodeStr
,
@"(AT[\w]*)"
)).
FirstOrDefault
()?.
CodeStr
;
if
(!
string
.
IsNullOrEmpty
(
hc
))
{
var
pn
=
Regex
.
Match
(
hc
,
@"(AT[\w]*)"
).
Groups
[
1
].
Value
;
CountMoveInfo
.
MoveParam
.
PN
=
pn
;
}
}
}
}
//var xx = CountMoveInfo.MoveParam.codeInfos.Find(c=> { return c.CodeStr.StartsWith("S20") && c.CodeType == "barcode"; });
//if (xx != null)
...
...
DeviceLibrary/theMachine/MainMachine_OutMove.cs
查看文件 @
a442e63
...
...
@@ -129,7 +129,7 @@ namespace DeviceLibrary
{
CountList
.
Remove
(
OutMoveInfo
.
MoveParam
.
ReeID
);
}
if
(
OutMoveInfo
.
MoveParam
.
QTY
>
=
0
)
if
(
OutMoveInfo
.
MoveParam
.
QTY
>
0
)
SetPrintJob
(
OutMoveInfo
);
else
{
OutMoveInfo
.
MoveParam
.
IsNg
=
true
;
...
...
LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
a442e63
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.
6.1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
8
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
...
...
TheMachine/App.config
查看文件 @
a442e63
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configSections
>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
</
configSections
>
<
appSettings
>
<
add
key
=
"CodeType"
value
=
"QR Code#Data Matrix ECC 200#barcode"
/>
<
add
key
=
"CodeType"
value
=
"QR Code#Data Matrix ECC 200#barcode"
/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"Conifg\"
/>
<
add
key
=
"CodeParamPath"
value
=
"Conifg\"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/TheMachine.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/TheMachine.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"HCBOARD"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/HCBOARD.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/HCBOARD.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"XrayImage"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/XrayImage.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/XrayImage.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"XRay"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/XRay.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/XRay.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"LngResource"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/LngResource.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/LngResource.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"%m%n"
/>
<
conversionPattern
value
=
"%m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
logger
>
<
logger
name
=
"HCBOARD"
additivity
=
"false"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"HCBOARD"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"HCBOARD"
/>
</
logger
>
<
logger
name
=
"XrayImage"
additivity
=
"false"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"XrayImage"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"XrayImage"
/>
</
logger
>
<
logger
name
=
"XRay"
additivity
=
"false"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"XRay"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"XRay"
/>
</
logger
>
<
logger
name
=
"LngResource"
additivity
=
"false"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"LngResource"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"LngResource"
/>
</
logger
>
<!--<
root
>
<
level
value
=
"Info"
/>
...
...
@@ -85,17 +85,17 @@
</
root
>-->
</
log4net
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
7.1"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
8"
/>
</
startup
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Newtonsoft.Json"
publicKeyToken
=
"30ad4fe6b2a6aeed"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-13.0.0.0"
newVersion
=
"13.0.0.0"
/>
<
assemblyIdentity
name
=
"Newtonsoft.Json"
publicKeyToken
=
"30ad4fe6b2a6aeed"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-13.0.0.0"
newVersion
=
"13.0.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
...
...
TheMachine/Properties/Resources.Designer.cs
查看文件 @
a442e63
...
...
@@ -19,7 +19,7 @@ namespace TheMachine.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"1
6
.0.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"1
7
.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
Resources
{
...
...
TheMachine/Properties/Settings.Designer.cs
查看文件 @
a442e63
...
...
@@ -12,7 +12,7 @@ namespace TheMachine.Properties {
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
6.10
.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
7.5
.0.0"
)]
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
...
...
TheMachine/TheMachine.csproj
查看文件 @
a442e63
...
...
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace>
<AssemblyName>AutoCountAndLabel</AssemblyName>
<TargetFrameworkVersion>v4.
7.1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
8
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论