Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20031_TinStorage
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d28fa105
由
刘韬
编写于
2026-02-11 21:13:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正出库时急停复位变入库的问题
1 个父辈
043fa856
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
105 行增加
和
8 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/CameraPointTest.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/TheMachine.csproj
TheMachine/VisionStoreDetect.cs
TheMachine/packages.config
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
d28fa10
...
...
@@ -444,7 +444,7 @@ namespace DeviceLibrary
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
closeD01
)
&&
dataMap
[
ParamDefine
.
closeD01
].
Equals
(
ParamDefine
.
doit
))
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:closeD01=doit"
);
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
result
=
"D01"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
HIGH
);
...
...
@@ -459,7 +459,7 @@ namespace DeviceLibrary
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
closeD02
)
&&
dataMap
[
ParamDefine
.
closeD02
].
Equals
(
ParamDefine
.
doit
))
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:closeD02=doit"
);
if
(
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
result
=
"D02"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
HIGH
);
...
...
@@ -477,6 +477,7 @@ namespace DeviceLibrary
{
result
=
"D03"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
HIGH
);
}
else
{
...
...
@@ -490,6 +491,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD01=doit"
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
LOW
);
result
=
"D01"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
//RobotManage.UserPause();
}
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openD02
)
&&
dataMap
[
ParamDefine
.
openD02
].
Equals
(
ParamDefine
.
doit
))
...
...
@@ -497,6 +499,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD02=doit"
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
LOW
);
result
=
"D02"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
//RobotManage.UserPause();
}
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openD03
)
&&
dataMap
[
ParamDefine
.
openD03
].
Equals
(
ParamDefine
.
doit
))
...
...
@@ -504,6 +507,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD03=doit"
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
result
=
"D03"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
//RobotManage.UserPause();
}
if
(!
result
.
Equals
(
""
))
...
...
DeviceLibrary/theMachine/CameraPointTest.cs
查看文件 @
d28fa10
...
...
@@ -15,6 +15,7 @@ using System.Text;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Xml.Linq
;
using
static
System
.
Windows
.
Forms
.
MonthCalendar
;
namespace
DeviceLibrary
{
...
...
@@ -34,6 +35,8 @@ namespace DeviceLibrary
public
static
Dictionary
<
TestStorePointPort
,
List
<
string
>>
StoreState
=
new
Dictionary
<
TestStorePointPort
,
List
<
string
>>();
public
static
void
Init
()
{
inArea
.
Clear
();
outArea
.
Clear
();
var
fd
=
File
.
ReadAllText
(
"Config\\CameraPointTest.json"
);
CameraData
=
JsonConvert
.
DeserializeObject
<
CameraData
>(
fd
);
for
(
int
i
=
0
;
i
<
5
;
i
++)
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
d28fa10
...
...
@@ -345,7 +345,7 @@ namespace DeviceLibrary
if
(!
UserPause
)
Msg
.
clear
();
else
currnetstoreStatus
=
StoreStatus
.
Debugg
ing
;
currnetstoreStatus
=
StoreStatus
.
Warn
ing
;
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
ServerCM
.
storeStatus
=
currnetstoreStatus
;
...
...
@@ -504,6 +504,19 @@ namespace DeviceLibrary
bool
SafeCheck
()
{
bool
ok
=
true
;
var
ignorestring
=
"["
+
crc
.
GetString
(
"Res0096"
,
"已忽略"
)
+
"]"
;
//if (IOManager.IOValue(IO_Type.LeftDoor_Check).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.LeftDoor_Lock, IO_VALUE.HIGH);
//}
//if (IOManager.IOValue(IO_Type.RightDoor_Check).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.RightDoor_Lock, IO_VALUE.HIGH);
//}
//if (IOManager.IOValue(IO_Type.PrinterDoor_Check).Equals(IO_VALUE.HIGH))
//{
// IOManager.IOMove(IO_Type.PrinterDoor_Lock, IO_VALUE.HIGH);
//}
if
(
IOValue
(
IO_Type
.
PrinterDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(!
IgnoreSafecheck
)
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
d28fa10
此文件的差异被折叠,
点击展开。
TheMachine/SettingControl.Designer.cs
查看文件 @
d28fa10
...
...
@@ -48,6 +48,9 @@ namespace TheMachine
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
tabPage_ledtower
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
uC_LedConfig1
=
new
TheMachine
.
UC
.
UC_LedConfig
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
flowLayoutPanel1
.
SuspendLayout
();
...
...
@@ -55,6 +58,7 @@ namespace TheMachine
this
.
tp
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
tabPage_ledtower
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// timer1
...
...
@@ -88,6 +92,7 @@ namespace TheMachine
// flowLayoutPanel1
//
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
panel1
);
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
panel2
);
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
flowLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
flowLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
...
...
@@ -103,7 +108,7 @@ namespace TheMachine
this
.
panel1
.
Controls
.
Add
(
this
.
btn_testlabeling
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
473
,
460
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
473
,
247
);
this
.
panel1
.
TabIndex
=
15
;
//
// tp
...
...
@@ -157,7 +162,7 @@ namespace TheMachine
// cb_labelingtestmoce
//
this
.
cb_labelingtestmoce
.
AutoSize
=
true
;
this
.
cb_labelingtestmoce
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
331
);
this
.
cb_labelingtestmoce
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
253
);
this
.
cb_labelingtestmoce
.
Name
=
"cb_labelingtestmoce"
;
this
.
cb_labelingtestmoce
.
Size
=
new
System
.
Drawing
.
Size
(
138
,
16
);
this
.
cb_labelingtestmoce
.
TabIndex
=
14
;
...
...
@@ -171,7 +176,7 @@ namespace TheMachine
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_printertest
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_labeledit
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cb_labelselect
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
1
86
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
1
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
340
,
126
);
this
.
groupBox1
.
TabIndex
=
12
;
...
...
@@ -218,7 +223,7 @@ namespace TheMachine
// btn_testlabeling
//
this
.
btn_testlabeling
.
Enabled
=
false
;
this
.
btn_testlabeling
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
362
);
this
.
btn_testlabeling
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
275
);
this
.
btn_testlabeling
.
Name
=
"btn_testlabeling"
;
this
.
btn_testlabeling
.
Size
=
new
System
.
Drawing
.
Size
(
201
,
38
);
this
.
btn_testlabeling
.
TabIndex
=
13
;
...
...
@@ -229,7 +234,7 @@ namespace TheMachine
// uC_SetUserPassword1
//
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
484
,
5
);
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
258
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
482
,
309
);
...
...
@@ -256,6 +261,35 @@ namespace TheMachine
this
.
uC_LedConfig1
.
TabIndex
=
7
;
this
.
uC_LedConfig1
.
Tag
=
"not"
;
//
// panel2
//
this
.
panel2
.
Controls
.
Add
(
this
.
button2
);
this
.
panel2
.
Controls
.
Add
(
this
.
button1
);
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
482
,
3
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
322
,
81
);
this
.
panel2
.
TabIndex
=
16
;
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
34
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
Text
=
"入库取料"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// button2
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
34
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
TabIndex
=
1
;
this
.
button2
.
Text
=
"扫码贴标"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// SettingControl
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
...
@@ -272,6 +306,7 @@ namespace TheMachine
this
.
tp
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
tabPage_ledtower
.
ResumeLayout
(
false
);
this
.
panel2
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
...
...
@@ -295,5 +330,8 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
CheckBox
cb_labelingtestmoce
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
FlowLayoutPanel
flowLayoutPanel1
;
private
System
.
Windows
.
Forms
.
Panel
panel2
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
}
}
TheMachine/SettingControl.cs
查看文件 @
d28fa10
using
CodeLibrary
;
using
ConfigHelper
;
using
DeviceLibrary
;
using
Newtonsoft.Json
;
using
OnlineStore
;
using
OnlineStore.ACSingleStore
;
using
OnlineStore.Common
;
...
...
@@ -12,6 +13,7 @@ using System.Data;
using
System.Drawing
;
using
System.Linq
;
using
System.Reflection
;
using
System.Security.Cryptography.X509Certificates
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
...
...
@@ -187,5 +189,33 @@ namespace TheMachine
RobotManage
.
mainMachine
.
LabelingTestMode
=
cb_labelingtestmoce
.
Checked
;
btn_testlabeling
.
Enabled
=
cb_labelingtestmoce
.
Checked
;
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
RobotManage
.
isRunning
||
RobotManage
.
mainMachine
.
runStatus
!=
RunStatus
.
Running
)
{
MessageBox
.
Show
(
"请先启动设备并完成回原"
);
}
//Setting_Init.Device_step_by_step_mode = true;
RobotManage
.
mainMachine
.
newDrawer
=
false
;
RobotManage
.
mainMachine
.
NGInfoList
=
new
List
<
ReelParam
>();
Setting_Init
.
Runtime_NGINFOLIST
=
JsonConvert
.
SerializeObject
(
RobotManage
.
mainMachine
.
NGInfoList
);
RobotManage
.
mainMachine
.
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
RobotManage
.
mainMachine
.
StoreMoveInfo
.
log
(
"手动开始取料"
);
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
RobotManage
.
isRunning
||
RobotManage
.
mainMachine
.
runStatus
!=
RunStatus
.
Running
)
{
MessageBox
.
Show
(
"请先启动设备并完成回原"
);
}
Setting_Init
.
Runtime_NGINFOLIST
=
JsonConvert
.
SerializeObject
(
RobotManage
.
mainMachine
.
NGInfoList
);
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
NewMove
(
MoveStep
.
Labeling01
);
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
log
(
"手动扫码"
);
}
}
}
\ No newline at end of file
TheMachine/TheMachine.csproj
查看文件 @
d28fa10
...
...
@@ -63,6 +63,9 @@
<Reference Include="Neotel.Rmaxis">
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
...
...
@@ -241,6 +244,7 @@
<DependentUpon>VisionStoreDetect.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
...
...
TheMachine/VisionStoreDetect.cs
查看文件 @
d28fa10
...
...
@@ -116,6 +116,7 @@ namespace TheMachine
{
// LogUtil.info("1");
//Common.DeepClone((Bitmap)pictureBox1.Image).Save("test.bmp");
CameraPointTest
.
Init
();
var
haslistStoreName
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
LogUtil
.
info
(
"入口:"
+
string
.
Join
(
","
,
haslistStoreName
));
haslistStoreName
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
出口
);
...
...
TheMachine/packages.config
0 → 100644
查看文件 @
d28fa10
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Newtonsoft.Json"
version
=
"13.0.1"
targetFramework
=
"net472"
/>
</
packages
>
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论