Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20031_TinStorage
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 82303d25
由
刘韬
编写于
2022-12-23 10:53:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
1fb8f362
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
101 行增加
和
45 行删除
Common/Setting_Init.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/CameraPointTest.cs
DeviceLibrary/theMachine/JobList.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Labeling.cs
DeviceLibrary/theMachine/MainMachine_StoreDemo.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
DeviceLibrary/userControl/AxisMoveControl.cs
TheMachine/Form1.Designer.cs
TheMachine/Form1.cs
TheMachine/IOControls.Designer.cs
TheMachine/IOControls.cs
TheMachine/SettingControl.Designer.cs
Common/Setting_Init.cs
查看文件 @
82303d2
...
...
@@ -83,6 +83,8 @@ namespace OnlineStore.Common
public
static
MyConfig
<
Runtime_StepE
>
Runtime_Step
=
Runtime_StepE
.
None
;
public
static
MyConfig
<
string
>
Runtime_Posid
=
""
;
public
static
MyConfig
<
string
>
Runtime_RFID
=
""
;
public
static
MyConfig
<
string
>
Runtime_PN
=
""
;
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
82303d2
...
...
@@ -401,7 +401,7 @@ namespace DeviceLibrary
return
map
;
if
(
IOManager
.
IOValue
(
IO_Type
.
Entry_Drawer
).
Equals
(
IO_VALUE
.
LOW
))
{
map
.
Add
(
ParamDefine
.
inDoorStatus
,
ParamDefine
.
disable
)
;
map
[
ParamDefine
.
inDoorStatus
]=
ParamDefine
.
disable
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
Entry_Drawer_Lock
).
Equals
(
IO_VALUE
.
HIGH
)
&&
RobotManage
.
mainMachine
.
StoreMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
...
...
@@ -414,7 +414,7 @@ namespace DeviceLibrary
}
if
(
IOManager
.
IOValue
(
IO_Type
.
Out_Drawer
).
Equals
(
IO_VALUE
.
LOW
))
{
map
.
Add
(
ParamDefine
.
outDoorStatus
,
ParamDefine
.
disable
)
;
map
[
ParamDefine
.
outDoorStatus
]=
ParamDefine
.
disable
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
Out_Drawer_Lock
).
Equals
(
IO_VALUE
.
HIGH
)
&&
RobotManage
.
mainMachine
.
StoreMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
...
...
@@ -443,7 +443,7 @@ namespace DeviceLibrary
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置
string
posId
=
data
[
ParamDefine
.
posId
].
ToString
();
string
usedCountstr
=
data
[
"usedCount"
].
ToString
();
//int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posId
);
...
...
@@ -455,12 +455,14 @@ namespace DeviceLibrary
LogUtil
.
info
(
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
}
int
usedCount
=
0
;
int
.
TryParse
(
usedCountstr
,
out
usedCount
);
WarnMsg
=
""
;
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
);
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
PosID
=
inStoreJob
.
PosId
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
usedCount
=
usedCount
;
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
"】二维码【"
+
message
+
"】 开始入库!"
);
LogUtil
.
info
(
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
"
,usedCount"
+
usedCount
+
"
】二维码【"
+
message
+
"】 开始入库!"
);
}
else
...
...
DeviceLibrary/theMachine/CameraPointTest.cs
查看文件 @
82303d2
...
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
[
Serializable
]
public
class
tstoredata
{
public
string
name
=
""
;
public
List
<
int
>
V
alue
=
new
List
<
int
>();
public
List
<
int
>
v
alue
=
new
List
<
int
>();
}
public
class
CameraPointTest
{
...
...
@@ -36,14 +36,14 @@ namespace DeviceLibrary
inArea
[
i
].
name
=
"L"
+
((
char
)(
0x41
+
i
)).
ToString
();
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
inArea
[
i
].
V
alue
.
Add
(-
1
);
inArea
[
i
].
v
alue
.
Add
(-
1
);
}
}
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
outArea
.
Add
(
new
tstoredata
());
outArea
[
i
].
name
=
"U"
+
((
char
)(
0x41
+
i
)).
ToString
();
outArea
[
i
].
V
alue
.
Add
(-
1
);
outArea
[
i
].
v
alue
.
Add
(-
1
);
}
}
public
static
event
EventHandler
<
Bitmap
>
TestStorePointEvent
;
...
...
@@ -66,7 +66,7 @@ namespace DeviceLibrary
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
inArea
[
i
].
V
alue
[
j
]=
haslistindex
[
index
];
inArea
[
i
].
v
alue
[
j
]=
haslistindex
[
index
];
index
++;
}
}
...
...
@@ -77,7 +77,7 @@ namespace DeviceLibrary
index
=
0
;
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
outArea
[
i
].
V
alue
[
0
]=
haslistindex
[
index
];
outArea
[
i
].
v
alue
[
0
]=
haslistindex
[
index
];
index
++;
}
break
;
...
...
DeviceLibrary/theMachine/JobList.cs
查看文件 @
82303d2
...
...
@@ -46,8 +46,7 @@ namespace DeviceLibrary
public
int
Count
{
get
=>
jobInfos
.
Count
;
}
public
void
ClearLastPosid
(
string
posid
)
{
if
(
lastoutpos
==
posid
)
public
void
ClearLastPosid
()
{
lastoutpos
=
""
;
}
}
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
82303d2
...
...
@@ -30,6 +30,7 @@ namespace DeviceLibrary
/// 库位号
/// </summary>
public
string
PosID
{
get
;
set
;
}
public
string
RFID
{
get
;
set
;
}
public
string
bitmapfilename
=
""
;
public
List
<
CodeInfo
>
codeInfos
{
get
;
set
;
}
/// <summary>
...
...
@@ -40,6 +41,7 @@ namespace DeviceLibrary
/// 料盘宽度
/// </summary>
public
int
PlateW
{
get
;
set
;
}
public
int
usedCount
{
get
;
set
;
}
/// <summary>
/// 是否是入料NG料
/// </summary>
...
...
@@ -72,6 +74,7 @@ namespace DeviceLibrary
/// </summary>
public
string
Batch
{
get
;
set
;
}
public
bool
ReelOnFixture
{
get
;
internal
set
;
}
=
false
;
public
string
OutPosID
{
get
;
internal
set
;
}
public
int
HeightPos
=
0
;
public
ReelParam
clone
()
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
82303d2
...
...
@@ -13,7 +13,7 @@ namespace DeviceLibrary
{
public
partial
class
MainMachine
:
IRobot
{
public
string
Name
{
get
;
set
;
}
=
"
MIMO_PLUS
"
;
public
string
Name
{
get
;
set
;
}
=
"
TinStore
"
;
private
bool
_canRunning
=
true
;
public
bool
canRunning
{
...
...
@@ -118,9 +118,15 @@ namespace DeviceLibrary
AlarmBuzzer
.
SetOnOffAction
(()
=>{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
HIGH
);
},
()
=>
{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
LOW
);
});
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
.
Entry_Drawer
,
Config
,
IO_VALUE
.
LOW
,
Entry_Drawer_Open
,
2500
,
100
);
LedProcessInit
();
}
private
void
Entry_Drawer_Open
()
{
nglist
=
new
List
<
string
>();
}
private
(
bool
,
string
)
Y_Axis_interference
(
int
from
,
int
to
)
{
if
(
Z_Axis
.
IsInPosition
(
Config
.
Z_Axis_P1
))
{
...
...
@@ -468,7 +474,6 @@ namespace DeviceLibrary
+
crc
.
GetString
(
"Res0104"
,
"运动报警"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
ButtenEvent
?.
Invoke
(
null
,
ErrInfo
.
SuddenStop
);
}
LogUtil
.
error
(
configMoveAxis
.
GetAxisValue
()+
","
+
configMoveAxis
.
Explain
+
" errcode "
+
HuichuanLibrary
.
HCBoardManager
.
GetAxErrCode
(
configMoveAxis
.
GetAxisValue
()));
LogUtil
.
error
(
string
.
Join
(
","
,
HuichuanLibrary
.
HCBoardManager
.
GetAxisErrorDetail
(
configMoveAxis
.
GetAxisValue
())));
ok
=
false
;
}
...
...
DeviceLibrary/theMachine/MainMachine_Labeling.cs
查看文件 @
82303d2
...
...
@@ -42,7 +42,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
Labeling03
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling04
);
RotateEquip
.
TurnDegree
(
3
6
);
RotateEquip
.
TurnDegree
(
3
0
);
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
LabelingMoveInfo
.
log
(
"滚动锡膏"
);
break
;
...
...
@@ -63,9 +63,17 @@ namespace DeviceLibrary
if
(
HasRightCode
(
xx
.
ToArray
(),
LabelingMoveInfo
.
MoveParam
))
{
Setting_Init
.
Runtime_RFID
=
LabelingMoveInfo
.
MoveParam
.
RFID
;
LabelingMoveInfo
.
MoveParam
.
IsNg
=
false
;
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling06
);
//ServerCM.SendInStoreRequest(new string[] { LabelingMoveInfo.MoveParam.SN }, LabelingMoveInfo.MoveParam, true);
LabelingMoveInfo
.
MoveParam
.
PlateH
=
50
;
LabelingMoveInfo
.
MoveParam
.
PlateW
=
7
;
ServerCM
.
SendInStoreRequest
(
new
string
[]
{
LabelingMoveInfo
.
MoveParam
.
WareCode
},
LabelingMoveInfo
.
MoveParam
,
true
);
Setting_Init
.
Runtime_Posid
=
LabelingMoveInfo
.
MoveParam
.
PosID
;
if
(
false
&&
LabelingMoveInfo
.
MoveParam
.
usedCount
>
0
)
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling55
);
}
return
;
}
}
...
...
@@ -74,10 +82,11 @@ namespace DeviceLibrary
LabelingMoveInfo
.
MoveParam
.
IsNg
=
false
;
LabelingMoveInfo
.
MoveParam
.
WareCode
=
"Demo"
;
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling06
);
ScanTimes
=
0
;
return
;
}
ScanTimes
++;
if
(
ScanTimes
>=
1
0
)
if
(
ScanTimes
>=
1
2
)
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling06
);
LabelingMoveInfo
.
log
(
$
"未识别到有效二维码,送到NG口"
);
...
...
@@ -101,6 +110,7 @@ namespace DeviceLibrary
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling06
);
var
hc
=
CameraPointTest
.
ScanRectangle
();
LabelingMoveInfo
.
log
(
"检测到绿色宽度:"
+
hc
);
ScanTimes
++;
if
(
demomode
&&
false
)
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling08
);
...
...
@@ -110,6 +120,11 @@ namespace DeviceLibrary
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling08
);
}
else
if
(
ScanTimes
>
10
)
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling08
);
LabelingMoveInfo
.
MoveParam
.
IsNg
=
true
;
LabelingMoveInfo
.
MoveParam
.
NgMsg
=
"未找到绿色区域"
;
}
}
break
;
case
MoveStep
.
Labeling08
:
...
...
@@ -157,13 +172,13 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
Labeling12
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling13
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_
Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
HIGH
);
LabelingMoveInfo
.
log
(
"接标台
上升"
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_
Back
,
IO_Type
.
Label_Dock_Front
,
IO_VALUE
.
LOW
);
LabelingMoveInfo
.
log
(
"接标台
左移动"
);
break
;
case
MoveStep
.
Labeling13
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling14
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_
Back
,
IO_Type
.
Label_Dock_Front
,
IO_VALUE
.
LOW
);
LabelingMoveInfo
.
log
(
"接标台
左移动
"
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_
Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
HIGH
);
LabelingMoveInfo
.
log
(
"接标台
上升
"
);
break
;
case
MoveStep
.
Labeling14
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling15
);
...
...
@@ -292,7 +307,10 @@ namespace DeviceLibrary
reelParam
.
LOT
=
cs
[
3
].
Substring
(
1
);
reelParam
.
EXP
=
cs
[
4
].
Substring
(
1
);
reelParam
.
SN
=
cs
[
5
].
Substring
(
1
);
reelParam
.
WareCode
=
reelParam
.
SN
;
reelParam
.
WareCode
=
c
.
CodeStr
;
reelParam
.
ReeID
=
reelParam
.
SN
;
reelParam
.
RFID
=
reelParam
.
SN
;
return
true
;
}
}
...
...
DeviceLibrary/theMachine/MainMachine_StoreDemo.cs
查看文件 @
82303d2
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
82303d2
...
...
@@ -78,7 +78,7 @@ namespace DeviceLibrary
///// </summary>
//public static HIKCamera CameraD=new HIKCamera();
public
static
DauxiKS107Controller
dauxiKS107
=
new
DauxiKS107Controller
();
public
static
PuYue
_FR540SP
RFID
=
new
Asa
.
RFID
.
PuYue_FR540SP
();
public
static
PuYue
RFID_FR540SP_C2S
RFID
=
new
PuYueRFID_FR540SP_C2S
();
public
static
PrinterHelper
printerHelper
=
new
PrinterHelper
();
public
static
void
Init
()
{
string
msg
=
""
;
...
...
@@ -164,7 +164,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
"标签打印机打开成功"
);
RFID
.
IP
=
Setting_Init
.
Device_RFID_IP
;
RFID
.
Open
();
RFID
.
Open
(
Setting_Init
.
Device_RFID_IP
);
if
(!
RFID
.
IsConn
)
{
IsLoadOk
=
false
;
...
...
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
查看文件 @
82303d2
...
...
@@ -169,6 +169,7 @@
this
.
lblAlarmcode
.
Tag
=
"not"
;
this
.
lblAlarmcode
.
Text
=
"ErrCode:160"
;
this
.
lblAlarmcode
.
Visible
=
false
;
this
.
lblAlarmcode
.
Click
+=
new
System
.
EventHandler
(
this
.
lblAlarmcode_Click
);
//
// label4
//
...
...
DeviceLibrary/userControl/AxisMoveControl.cs
查看文件 @
82303d2
...
...
@@ -449,5 +449,12 @@ namespace DeviceLibrary
private
void
AxisMoveControl_Load
(
object
sender
,
EventArgs
e
)
{
}
private
void
lblAlarmcode_Click
(
object
sender
,
EventArgs
e
)
{
var
s
=
string
.
Join
(
","
,
HuichuanLibrary
.
HCBoardManager
.
GetAxisErrorDetail
(
SlvAddr
));
MessageBox
.
Show
(
s
);
LogUtil
.
error
(
s
);
}
}
}
\ No newline at end of file
TheMachine/Form1.Designer.cs
查看文件 @
82303d2
...
...
@@ -47,7 +47,7 @@ namespace TheMachine
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
b
utton2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
b
tn_entrylock
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
stateView
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
cb_IgnoreSafecheck
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
...
@@ -200,7 +200,7 @@ namespace TheMachine
this
.
pnl
.
Controls
.
Add
(
this
.
button3
);
this
.
pnl
.
Controls
.
Add
(
this
.
button4
);
this
.
pnl
.
Controls
.
Add
(
this
.
button1
);
this
.
pnl
.
Controls
.
Add
(
this
.
b
utton2
);
this
.
pnl
.
Controls
.
Add
(
this
.
b
tn_entrylock
);
this
.
pnl
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
pnl
.
Controls
.
Add
(
this
.
cb_IgnoreSafecheck
);
this
.
pnl
.
Controls
.
Add
(
this
.
pictureBox2
);
...
...
@@ -249,19 +249,20 @@ namespace TheMachine
this
.
button1
.
TabIndex
=
272
;
this
.
button1
.
Text
=
"出库"
;
this
.
button1
.
UseVisualStyleBackColor
=
false
;
this
.
button1
.
Visible
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// b
utton2
// b
tn_entrylock
//
this
.
b
utton2
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
b
utton2
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
b
utton2
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
271
);
this
.
b
utton2
.
Name
=
"button2
"
;
this
.
b
utton2
.
Size
=
new
System
.
Drawing
.
Size
(
139
,
55
);
this
.
b
utton2
.
TabIndex
=
272
;
this
.
b
utton2
.
Text
=
"入库
"
;
this
.
b
utton2
.
UseVisualStyleBackColor
=
false
;
this
.
b
utton2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
this
.
b
tn_entrylock
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
b
tn_entrylock
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
b
tn_entrylock
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
271
);
this
.
b
tn_entrylock
.
Name
=
"btn_entrylock
"
;
this
.
b
tn_entrylock
.
Size
=
new
System
.
Drawing
.
Size
(
139
,
55
);
this
.
b
tn_entrylock
.
TabIndex
=
272
;
this
.
b
tn_entrylock
.
Text
=
"入库门上锁
"
;
this
.
b
tn_entrylock
.
UseVisualStyleBackColor
=
false
;
this
.
b
tn_entrylock
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// groupBox1
//
...
...
@@ -471,7 +472,7 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
日本语
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
englishToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
b
utton2
;
private
System
.
Windows
.
Forms
.
Button
b
tn_entrylock
;
private
System
.
Windows
.
Forms
.
Button
button3
;
private
System
.
Windows
.
Forms
.
Button
button4
;
}
...
...
TheMachine/Form1.cs
查看文件 @
82303d2
...
...
@@ -667,7 +667,8 @@ namespace TheMachine
MessageBox
.
Show
(
crc
.
GetString
(
"Res0019"
,
"入料抽屉未关闭"
));
return
;
}
RobotManage
.
mainMachine
.
DemoIn
();
IOManager
.
IOMove
(
IO_Type
.
Entry_Drawer_Lock
,
IO_VALUE
.
HIGH
);
//RobotManage.mainMachine.DemoIn();
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -675,6 +676,7 @@ namespace TheMachine
if
(
IOManager
.
IOValue
(
IO_Type
.
Out_Drawer
).
Equals
(
IO_VALUE
.
LOW
))
{
MessageBox
.
Show
(
crc
.
GetString
(
"Res0020"
,
"出料抽屉未关闭"
));
return
;
}
RobotManage
.
mainMachine
.
DemoOut
();
...
...
TheMachine/IOControls.Designer.cs
查看文件 @
82303d2
此文件的差异被折叠,
点击展开。
TheMachine/IOControls.cs
查看文件 @
82303d2
...
...
@@ -88,15 +88,31 @@ namespace TheMachine
private
void
button9_Click
(
object
sender
,
EventArgs
e
)
{
for
(
int
i
=
1
;
i
<
10
;
i
++)
{
Thread
.
Sleep
(
300
);
RobotManage
.
RFID
.
ReadEPC
(
out
byte
[]
data
);
if
(
data
!=
null
)
{
MessageBox
.
Show
(
RobotManage
.
RFID
.
HexBuff
(
data
));
return
;
for
(
int
i
=
0
;
i
<
6
;
i
++)
{
Thread
.
Sleep
(
200
);
if
(
RobotManage
.
RFID
.
ReadEPC
(
12
,
out
byte
[]
data
))
{
if
(
data
[
0
]
!=
0xFF
)
{
MessageBox
.
Show
(
RobotManage
.
RFID
.
HexBuff
(
data
)
+
"\r\n"
+
Encoding
.
ASCII
.
GetString
(
data
).
Trim
());
return
;
}
}
}
MessageBox
.
Show
(
"no data"
);
}
private
void
button10_Click
(
object
sender
,
EventArgs
e
)
{
Thread
.
Sleep
(
300
);
var
epc
=
"20418002Z-203"
;
epc
=
"20418002Z-20"
;
epc
=
epc
.
PadRight
(
12
);
var
result
=
RobotManage
.
RFID
.
WriteEPC
(
Encoding
.
ASCII
.
GetBytes
(
epc
));
if
(
result
)
{
MessageBox
.
Show
(
"写入成功"
);
return
;
}
}
}
}
TheMachine/SettingControl.Designer.cs
查看文件 @
82303d2
...
...
@@ -175,7 +175,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
(
18
,
244
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
153
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
340
,
126
);
this
.
groupBox1
.
TabIndex
=
12
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论