Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fc21d0ff
由
刘韬
编写于
2022-12-08 14:06:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ca83f21f
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
49 行增加
和
14 行删除
Common/StringList.cs
Common/util/HumitureController.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/RobotManage.cs
TheMachine/Form1.cs
TheMachine/SettingControl.cs
Common/StringList.cs
查看文件 @
fc21d0f
...
...
@@ -140,6 +140,7 @@ namespace OnlineStore.Common
begin_close_string_door
,
tray_detect_reel_01
,
system_running_cantmove
,
before_FrmPositionTool_stopmuchine
before_FrmPositionTool_stopmuchine
,
temp
}
}
Common/util/HumitureController.cs
查看文件 @
fc21d0f
...
...
@@ -313,8 +313,11 @@ namespace OnlineStore.Common
string
hum
=
String
.
Format
(
"{0:X2}"
,
dataArray
[
5
])
+
String
.
Format
(
"{0:X2}"
,
dataArray
[
6
]);
double
tempV
=
(
double
)
Convert
.
ToInt32
(
temp
,
16
)/
10
;
double
humV
=(
double
)
Convert
.
ToInt32
(
hum
,
16
)/
10
;
if
(
humV
<
0.1
)
humV
=
0.1
;
if
(
tempV
<
0.1
)
tempV
=
0.1
;
list
.
Add
(
tempV
);
list
.
Add
(
humV
);
}
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
fc21d0f
...
...
@@ -204,18 +204,18 @@ namespace DeviceLibrary
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
To
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
ToFix
));
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX04
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Comp_PH
,
Config
.
Comp_P2_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PL
,
Config
.
UpDown_P3_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PL
,
Config
.
UpDown_P3_speed
/
2
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴高点:{Fix.Comp_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地低点:{Fix.UpDown_PL}"
);
break
;
case
MoveStep
.
StoreFIX04
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
4
00
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10
00
));
break
;
case
MoveStep
.
StoreFIX05
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX06
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Comp_PL
,
Config
.
Comp_P2_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P3_speed
/
2
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P3_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}"
);
break
;
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
fc21d0f
...
...
@@ -148,8 +148,13 @@ namespace DeviceLibrary
UpDown_PL
=
aCStorePosition
.
UpDownAxis_ILPosition_P4
;
Comp_PH
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
aCStorePosition
.
BagHigh
-
8
+
Config
.
Comp_PH_MM
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
reel
.
PlateH
-
8
)
-
(
reel
.
PlateH
>
8
?
Config
.
Comp_PoToMM
*
Config
.
Comp_PL_MM
:
0
);
int
reelhighdiff
=
0
;
if
(
reel
.
PlateW
>
7
)
reelhighdiff
=
ConfigHelper
.
Config
.
Get
(
"Device_1315_ReelHeight_Compensation"
,
0
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
reel
.
PlateH
-
8
+
reelhighdiff
)
-
(
reel
.
PlateH
>
8
?
Config
.
Comp_PoToMM
*
Config
.
Comp_PL_MM
:
0
);
Comp_PH
=
Comp_PH
<
0
?
0
:
Comp_PH
;
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
posid
=
aCStorePosition
.
PositionNum
;
...
...
@@ -182,8 +187,11 @@ namespace DeviceLibrary
if
(
reel
.
PlateW
>
7
&&
Config
.
InOut_P4
>
0
)
InOut_P2
=
Config
.
InOut_P4
;
}
int
reelhighdiff
=
0
;
if
(
reel
.
PlateW
>
7
)
reelhighdiff
=
ConfigHelper
.
Config
.
Get
(
"Device_1315_ReelHeight_Compensation"
,
0
);
Comp_PH
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
reel
.
PlateH
-
8
+
Config
.
Comp_PH_MM
+
20
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
reel
.
PlateH
-
8
)
-
(
reel
.
PlateH
>
8
?
Config
.
Comp_PoToMM
*
Config
.
Comp_PL_MM
:
0
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
reel
.
PlateH
-
8
+
reelhighdiff
)
-
(
reel
.
PlateH
>
8
?
Config
.
Comp_PoToMM
*
Config
.
Comp_PL_MM
:
0
);
Comp_PH
=
Comp_PH
<
0
?
0
:
Comp_PH
;
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
Reel
=
reel
.
clone
();
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
fc21d0f
...
...
@@ -180,6 +180,7 @@ namespace DeviceLibrary
IOMonitor
.
RegisterIO
(
IO_Type
.
AutoRun_Single
,
Config
,
IO_VALUE
.
HIGH
,
Run_BTN
,
2500
,
100
);
LedProcessInit
();
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
);
ConfigHelper
.
Config
.
Get
(
"Device_1315_ReelHeight_Compensation"
,
0
);
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
...
...
@@ -319,6 +320,7 @@ namespace DeviceLibrary
Run
();
}
public
void
Stop
()
{
LogUtil
.
info
(
"开始停止系统2."
);
mstart
=
false
;
AutoInOutTest
=
false
;
ServerCM
.
StopConnectServer
();
...
...
@@ -515,10 +517,22 @@ namespace DeviceLibrary
forceHome
=
false
;
StringMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
ClampMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
boxTransport
.
Reset
();
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
EndMove
();
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
)
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut_NGPre
);
StoreMoveInfo
.
MoveParam
.
PosID
=
"NG"
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
56
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
7
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
tray_detect_reel_01
,
"料叉传感器感应到有料,请人工确认"
);
StoreMoveInfo
.
log
(
$
"开始无信息料盘出库"
);
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
CloseFlipDoor
(
StoreMoveInfo
);
}
runStatus
=
RunStatus
.
Running
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
break
;
...
...
@@ -670,6 +684,8 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
configMoveAxis
.
ProName
,
configMoveAxis
.
Explain
)
+
$
"[{configMoveAxis.GetAxisValue()}]:"
+
crc
.
GetString
(
L
.
motion_alarm
,
"运动报警"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
ok
=
false
;
LogUtil
.
error
(
string
.
Join
(
","
,
HuichuanLibrary
.
HCBoardManager
.
GetAxisErrorDetail
(
configMoveAxis
.
GetAxisValue
())));
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
fc21d0f
...
...
@@ -80,7 +80,7 @@ namespace DeviceLibrary
switch
(
ClampMoveInfo
.
MoveStep
)
{
case
MoveStep
.
Wait
:
if
(
IsGetReelReady
&&
StoreMoveInfo
.
MoveStep
<
MoveStep
.
StoreOut10
)
if
(
IsGetReelReady
&&
StoreMoveInfo
.
MoveStep
<
MoveStep
.
StoreOut10
&&
OutSingleJobList
.
Count
==
0
)
{
ClampMoveInfo
.
NewMove
(
MoveStep
.
ReelClamp_01
);
OpenFlipDoor
(
ClampMoveInfo
);
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
fc21d0f
...
...
@@ -25,7 +25,7 @@ namespace DeviceLibrary
{
JobInfo
jobInfo
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
);
OutSingleJobList
.
Enqueue
(
jobInfo
);
LogUtil
.
info
(
$
"添加单盘出库任务队列: {posId},当前任务数量: {OutS
tor
eJobList.Count}"
);
LogUtil
.
info
(
$
"添加单盘出库任务队列: {posId},当前任务数量: {OutS
ingl
eJobList.Count}"
);
}
void
StoreProcess
()
{
...
...
@@ -36,7 +36,8 @@ namespace DeviceLibrary
{
case
MoveStep
.
Wait
:
//IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)
//if (StoreMoveInfo.IsTimeOut(5) && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture,Config,IO_VALUE.HIGH,5000) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait) {
//if (StoreMoveInfo.IsTimeOut(5) && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait)
//{
// StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre);
// StoreMoveInfo.MoveParam.PosID = "NG";
// StoreMoveInfo.MoveParam.PlateH = 56;
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
fc21d0f
...
...
@@ -135,6 +135,7 @@ namespace DeviceLibrary
public
static
void
Stop
()
{
LogUtil
.
info
(
"开始停止系统."
);
if
(
mainMachine
!=
null
)
{
mainMachine
.
Stop
();
...
...
TheMachine/Form1.cs
查看文件 @
fc21d0f
...
...
@@ -383,6 +383,7 @@ namespace TheMachine
MainMachine_ProcessMsgEvent
(
Msg
.
get
());
return
;
}
LogUtil
.
info
(
"用户按下启动"
);
RobotManage
.
Start
();
userpause
=
false
;
if
(
RobotManage
.
isRunning
)
...
...
@@ -391,7 +392,7 @@ namespace TheMachine
RobotManage_UserPauseSet
(
this
,
false
);
//(sender as Button).Text = "暂停运行";
}
LogUtil
.
info
(
"用户按下启动"
);
}
else
if
(!
userpause
)
{
...
...
@@ -441,10 +442,14 @@ namespace TheMachine
},
sender
,
e
);
return
;
}
if
(!
btn_stop
.
Enabled
)
return
;
btn_stop
.
Enabled
=
false
;
LogUtil
.
info
(
"用户按下停止按钮"
);
RobotManage
.
UserPause
(
false
);
userpause
=
false
;
Task
.
Run
(()
=>
{
RobotManage
.
Stop
();
});
btn_stop
.
Enabled
=
false
;
btn_run
.
Text
=
crc
.
GetString
(
L
.
start
,
"启动"
);
btn_run
.
BackColor
=
Color
.
Transparent
;
cb_IgnoreSafecheck
.
Enabled
=
true
;
...
...
TheMachine/SettingControl.cs
查看文件 @
fc21d0f
...
...
@@ -125,7 +125,7 @@ namespace TheMachine
return
;
}
var
t
=
HumitureController
.
LastData
;
lbl_hmdstate
.
Text
+=
$
"{crc.GetString(L.
humidity
, "
温度
")}:{t.Temperate}℃, {crc.GetString(L.humidity, "
湿度
")}:{t.Humidity}%"
;
lbl_hmdstate
.
Text
+=
$
"{crc.GetString(L.
temp
, "
温度
")}:{t.Temperate}℃, {crc.GetString(L.humidity, "
湿度
")}:{t.Humidity}%"
;
}
private
void
button1_Click_1
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论