Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1053_SBSH
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6cdb8f0b
由
刘韬
编写于
2023-03-21 09:18:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
457b6bbb
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
26 行增加
和
23 行删除
Common/Common.csproj
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/packages.config
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine.cs
LoadCVSLibrary/LoadCSVLibrary.csproj
LoadCVSLibrary/storeConfig/ConfigItemBase.cs
TheMachine/App.config
TheMachine/TheMachine.csproj
Common/Common.csproj
查看文件 @
6cdb8f0
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>MyCommon</AssemblyName>
<AssemblyName>MyCommon</AssemblyName>
<TargetFrameworkVersion>v4.
6
.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
7
.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFrameworkProfile />
</PropertyGroup>
</PropertyGroup>
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
6cdb8f0
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceLibrary</RootNamespace>
<RootNamespace>DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName>
<AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.
6
.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
7
.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<TargetFrameworkProfile />
...
...
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
6cdb8f0
using
OnlineStore.Common
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -45,28 +46,28 @@ namespace DeviceLibrary
...
@@ -45,28 +46,28 @@ namespace DeviceLibrary
openretry
++;
openretry
++;
{
{
Msg
+=
string
.
Format
(
"第{0}次尝试打开轴:{1}"
,
openretry
,
Config
.
Explain
);
Msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0083.1bf30741"
,
"第{0}次尝试打开轴:{1}"
),
openretry
,
crc
.
GetString
(
Config
.
ProName
,
Config
.
Explain
)
);
if
(
AxisManager
.
GetBusyStatus
(
portName
,
slvAddr
)
==
1
)
if
(
AxisManager
.
GetBusyStatus
(
portName
,
slvAddr
)
==
1
)
{
{
AxisManager
.
SuddenStop
(
portName
,
slvAddr
);
AxisManager
.
SuddenStop
(
portName
,
slvAddr
);
Msg
+=
string
.
Format
(
"...伺服忙碌,急停{0}次"
,
openretry
);
Msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0084.814c87d5"
,
"...伺服忙碌,急停{0}次"
)
,
openretry
);
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
}
}
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
{
{
Msg
+=
"...使能成功"
;
Msg
+=
crc
.
GetString
(
"Res0085.226d8802"
,
"...使能成功"
)
;
openretry
=
0
;
openretry
=
0
;
return
true
;
return
true
;
}
}
else
else
Msg
+=
"...尝试使能失败"
;
Msg
+=
crc
.
GetString
(
"Res0086.ebec6459"
,
"...尝试使能失败"
)
;
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
if
(
openretry
<
5
)
if
(
openretry
<
5
)
Msg
=
"伺服连接中..."
;
Msg
=
crc
.
GetString
(
"Res0087.3cb23f45"
,
"伺服连接中..."
)
;
}
}
return
false
;
return
false
;
}
}
...
@@ -94,12 +95,12 @@ namespace DeviceLibrary
...
@@ -94,12 +95,12 @@ namespace DeviceLibrary
System
.
Threading
.
Thread
.
Sleep
(
100
);
System
.
Threading
.
Thread
.
Sleep
(
100
);
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
{
{
LogUtil
.
info
(
AxisName
+
"清理报警后重新打卡轴成功:"
+
Config
.
Explain
);
LogUtil
.
info
(
AxisName
+
"清理报警后重新打卡轴成功:"
+
crc
.
GetString
(
Config
.
ProName
,
Config
.
Explain
)
);
}
}
else
else
{
{
AxisManager
.
ServoOff
(
portName
,
slvAddr
);
AxisManager
.
ServoOff
(
portName
,
slvAddr
);
msg
=
"打开轴"
+
Config
.
Explain
+
"失败 "
;
msg
=
crc
.
GetString
(
"Res0088.2bf5c941"
,
"打开轴"
)
+
crc
.
GetString
(
Config
.
ProName
,
Config
.
Explain
)
+
crc
.
GetString
(
"Res0089.33d2a704"
,
"失败 "
)
;
LogUtil
.
info
(
AxisName
+
msg
);
LogUtil
.
info
(
AxisName
+
msg
);
return
false
;
return
false
;
}
}
...
@@ -195,7 +196,7 @@ namespace DeviceLibrary
...
@@ -195,7 +196,7 @@ namespace DeviceLibrary
int
isAlarm
=
AxisManager
.
GetAlarmStatus
(
deviceName
,
axisNo
);
int
isAlarm
=
AxisManager
.
GetAlarmStatus
(
deviceName
,
axisNo
);
if
(
isAlarm
.
Equals
(
1
))
if
(
isAlarm
.
Equals
(
1
))
{
{
clearMsg
=
"清理报警,"
;
clearMsg
=
crc
.
GetString
(
"Res0090.cbd5d752"
,
"清理报警,"
)
;
AxisManager
.
AlarmClear
(
deviceName
,
axisNo
);
AxisManager
.
AlarmClear
(
deviceName
,
axisNo
);
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
AxisManager
.
ServoOn
(
deviceName
,
axisNo
);
AxisManager
.
ServoOn
(
deviceName
,
axisNo
);
...
@@ -244,7 +245,7 @@ namespace DeviceLibrary
...
@@ -244,7 +245,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
msg
=
MoveInfo
.
Name
+
" "
+
MoveInfo
.
MoveStep
+
axis
.
DisplayStr
+
",收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
msg
=
MoveInfo
.
Name
+
" "
+
MoveInfo
.
MoveStep
+
axis
.
DisplayStr
+
crc
.
GetString
(
"Res0091.405c5a9e"
,
",收到原点完成信号,当前位置["
)
+
outCount
+
crc
.
GetString
(
"Res0092.6658614e"
,
"],误差过大,需要报警"
)
;
LogUtil
.
error
(
msg
);
LogUtil
.
error
(
msg
);
}
}
}
}
...
@@ -432,11 +433,11 @@ namespace DeviceLibrary
...
@@ -432,11 +433,11 @@ namespace DeviceLibrary
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
if
(
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
!=
0
)
if
(
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
!=
0
)
{
{
msg
+=
string
.
Format
(
"轴(0)存在报警,清除失败"
,
axis
.
Config
.
Explain
);
msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0093.95840864"
,
"轴(0)存在报警,清除失败"
),
crc
.
GetString
(
axis
.
Config
.
ProName
,
axis
.
Config
.
Explain
)
);
isok
=
false
;
isok
=
false
;
}
}
else
else
msg
+=
string
.
Format
(
"轴(0)存在报警,清除成功"
,
axis
.
Config
.
Explain
);
msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0094.b5876296"
,
"轴(0)存在报警,清除成功"
),
crc
.
GetString
(
axis
.
Config
.
ProName
,
axis
.
Config
.
Explain
);
}
}
}
}
Thread
.
Sleep
(
50
);
Thread
.
Sleep
(
50
);
...
@@ -461,4 +462,4 @@ namespace DeviceLibrary
...
@@ -461,4 +462,4 @@ namespace DeviceLibrary
}
}
}
}
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/packages.config
查看文件 @
6cdb8f0
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
packages
>
<
package
id
=
"Newtonsoft.Json"
version
=
"13.0.1"
targetFramework
=
"net461"
/>
<
package
id
=
"Newtonsoft.Json"
version
=
"13.0.1"
targetFramework
=
"net461"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net461"
requireReinstallation
=
"true"
/>
</
packages
>
</
packages
>
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
6cdb8f0
...
@@ -31,7 +31,7 @@ namespace DeviceLibrary
...
@@ -31,7 +31,7 @@ namespace DeviceLibrary
public
event
Func
<
bool
,
bool
>
DoorControl
;
public
event
Func
<
bool
,
bool
>
DoorControl
;
public
bool
IsComplateOrFree
{
get
=>
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
!
movelock
;
}
public
bool
IsComplateOrFree
{
get
=>
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
!
movelock
;
}
public
bool
IsTakedReel
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS10
;
}
public
bool
IsTakedReel
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS10
;
}
public
bool
IsPutOnOut
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS16
;
}
public
bool
IsPutOnOut
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS16
||
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
;
}
public
ReelTransport
(
Robot_Config
_Config
,
MainMachine
_mainMachine
)
public
ReelTransport
(
Robot_Config
_Config
,
MainMachine
_mainMachine
)
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
6cdb8f0
...
@@ -292,7 +292,7 @@ namespace DeviceLibrary
...
@@ -292,7 +292,7 @@ namespace DeviceLibrary
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
if
(!
UserPause
)
if
(!
UserPause
)
Msg
.
clear
();
Msg
.
clear
();
else
else
if
(!
hasAlarm
)
currnetstoreStatus
=
StoreStatus
.
Debugging
;
currnetstoreStatus
=
StoreStatus
.
Debugging
;
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
...
@@ -493,7 +493,7 @@ namespace DeviceLibrary
...
@@ -493,7 +493,7 @@ namespace DeviceLibrary
UserPause
=
true
;
UserPause
=
true
;
}
}
Msg
.
add
(
crc
.
GetString
(
"Res0015"
,
"后侧防护门没有关闭"
)
+
(
ok
?
ignorestring
:
""
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
"Res0015"
,
"后侧防护门没有关闭"
)
+
(
ok
?
ignorestring
:
""
),
MsgLevel
.
alarm
);
}
}
if
(!
lastSafeCheckStatus
&&
ok
)
if
(!
lastSafeCheckStatus
&&
ok
)
{
{
SafetyDevice
.
ResumeAll
();
SafetyDevice
.
ResumeAll
();
...
...
LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
6cdb8f0
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.
6
.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
7
.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFrameworkProfile />
</PropertyGroup>
</PropertyGroup>
...
...
LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
6cdb8f0
...
@@ -172,7 +172,9 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -172,7 +172,9 @@ namespace OnlineStore.LoadCSVLibrary
{
{
get
get
{
{
return
ElectricalDefinition
+
"-"
+
Explain
;
// + "-" + ProName + "";
//return ElectricalDefinition + "-" + Explain;// + "-" + ProName + "";
return
ElectricalDefinition
+
"-"
+
crc
.
GetString
(
ProType
+
"_"
+
ProName
,
Explain
);
}
}
}
}
ushort
value
=
0
;
ushort
value
=
0
;
...
...
TheMachine/App.config
查看文件 @
6cdb8f0
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
</
root
>-->
</
root
>-->
</
log4net
>
</
log4net
>
<
startup
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6
.2"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
7
.2"
/>
</
startup
>
</
startup
>
<
runtime
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
...
...
TheMachine/TheMachine.csproj
查看文件 @
6cdb8f0
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace>
<RootNamespace>TheMachine</RootNamespace>
<AssemblyName>SBSH</AssemblyName>
<AssemblyName>SBSH</AssemblyName>
<TargetFrameworkVersion>v4.
6
.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
7
.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
<Deterministic>false</Deterministic>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论