Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f27ffb8e
由
刘韬
编写于
2022-05-04 13:47:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
c2eb793e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
259 行增加
和
46 行删除
Common/CodeResourceControl.cs
Common/StringList.cs
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/Camera.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/StoreConfig/fixPositions.csv
DeviceLibrary/StoreConfig/linePositions.csv
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MoveStep.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/userControl/AxisMoveControl.cs
TheMachine/AxisControl.Designer.cs
TheMachine/Form1.Designer.cs
TheMachine/Form1.cs
TheMachine/IOControls.Designer.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/UC/ConfigControl.cs
TheMachine/UC/IOControl.cs
TheMachine/UC/StorePosControl.cs
TheMachine/UC/uc_boxdebug.Designer.cs
TheMachine/UC/uc_boxdebug.cs
Common/CodeResourceControl.cs
查看文件 @
f27ffb8
...
@@ -64,7 +64,7 @@ namespace OnlineStore
...
@@ -64,7 +64,7 @@ namespace OnlineStore
}
}
LoadData
(
true
);
LoadData
(
true
);
//SetCurrentCulture(CurrLanguage);
//SetCurrentCulture(CurrLanguage);
LanguageChangeEvent
?.
Invoke
(
null
,
EventArgs
.
Empty
);
//
LanguageChangeEvent?.Invoke(null, EventArgs.Empty);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
...
Common/StringList.cs
查看文件 @
f27ffb8
...
@@ -126,6 +126,7 @@ namespace OnlineStore.Common
...
@@ -126,6 +126,7 @@ namespace OnlineStore.Common
monitor_config_load_fail
,
monitor_config_load_fail
,
monitor_config_not_exist
,
monitor_config_not_exist
,
AxisMoveControl_status_monitor
,
AxisMoveControl_status_monitor
,
string_full_takeout
string_full_takeout
,
string_not_onposition
}
}
}
}
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
f27ffb8
...
@@ -147,6 +147,9 @@
...
@@ -147,6 +147,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
<None Include="packages.config" />
<None Include="packages.config" />
<None Include="StoreConfig\fixPositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\linePositions.csv">
<None Include="StoreConfig\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
...
...
DeviceLibrary/DeviceLibrary/Camera.cs
查看文件 @
f27ffb8
...
@@ -173,4 +173,5 @@ public enum FixtureState
...
@@ -173,4 +173,5 @@ public enum FixtureState
ToOut
,
ToOut
,
ToInSide
,
ToInSide
,
ToOutSide
,
ToOutSide
,
ToFix
,
}
}
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
f27ffb8
...
@@ -218,6 +218,7 @@ namespace DeviceLibrary
...
@@ -218,6 +218,7 @@ namespace DeviceLibrary
}
}
return
host
+
api_communication
;
return
host
+
api_communication
;
}
}
int
getthtime
=
0
;
public
void
SendLineStatus
()
public
void
SendLineStatus
()
{
{
if
(
RobotManage
.
InoutDebugMode
)
if
(
RobotManage
.
InoutDebugMode
)
...
@@ -228,13 +229,19 @@ namespace DeviceLibrary
...
@@ -228,13 +229,19 @@ namespace DeviceLibrary
//构建发送给服务器的对象
//构建发送给服务器的对象
Operation
lineOperation
=
getLineBoxStatus
();
Operation
lineOperation
=
getLineBoxStatus
();
//如果还没湿度范围,先获取
//如果还没湿度范围,先获取
if
(
Max_Humidity
<=
0
||
(
Max_Temperature
<=
0
)
)
if
(
getthtime
<
3
)
{
{
lineOperation
.
op
=
5
;
if
(
Max_Humidity
<=
0
||
(
Max_Temperature
<=
0
))
LogUtil
.
info
(
StoreName
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
);
{
lineOperation
.
op
=
5
;
LogUtil
.
info
(
StoreName
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
);
getthtime
++;
}
}
}
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
lineOperation
,
false
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
lineOperation
,
false
);
if
(
resultOperation
!=
null
)
getthtime
=
0
;
//LogUtil.info(JsonHelper.SerializeObject(resultOperation.data));
//LogUtil.info(JsonHelper.SerializeObject(resultOperation.data));
ResultProcess
(
resultOperation
);
ResultProcess
(
resultOperation
);
TimeSpan
span
=
DateTime
.
Now
-
time
;
TimeSpan
span
=
DateTime
.
Now
-
time
;
...
@@ -421,8 +428,10 @@ namespace DeviceLibrary
...
@@ -421,8 +428,10 @@ namespace DeviceLibrary
}
}
else
if
(
RobotManage
.
mainMachine
.
ClampMoveInfo
.
MoveStep
==
MoveStep
.
InWaitServerCallback
)
else
if
(
RobotManage
.
mainMachine
.
ClampMoveInfo
.
MoveStep
==
MoveStep
.
InWaitServerCallback
)
{
{
string
msg
=
resultOperation
.
msg
;
SendStoreState
(
""
,
StoreStatus
.
InStoreError
);
SendStoreState
(
""
,
StoreStatus
.
InStoreError
);
RobotManage
.
mainMachine
.
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_01
);
//RobotManage.mainMachine.ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01);
RobotManage
.
mainMachine
.
NGPuted
(
msg
);
LogUtil
.
info
(
"服务器没有正确返回库位."
);
LogUtil
.
info
(
"服务器没有正确返回库位."
);
}
}
else
{
else
{
...
...
DeviceLibrary/StoreConfig/fixPositions.csv
0 → 100644
查看文件 @
f27ffb8
位置,优先级,高度,宽度,料仓ID,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
fix#7,1,24,7,1,139000,85635,76635,216000
fix#13,2,24,13,1,139000,114988,105988,216000
DeviceLibrary/StoreConfig/linePositions.csv
查看文件 @
f27ffb8
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
f27ffb8
...
@@ -15,6 +15,7 @@ namespace DeviceLibrary
...
@@ -15,6 +15,7 @@ namespace DeviceLibrary
Robot_Config
Config
;
Robot_Config
Config
;
BoxStorePosition
From
;
BoxStorePosition
From
;
BoxStorePosition
To
;
BoxStorePosition
To
;
BoxStorePosition
Fix
;
MainMachine
mainMachine
;
MainMachine
mainMachine
;
//using static mainMachine;
//using static mainMachine;
AxisBean
Middle_Axis
;
AxisBean
Middle_Axis
;
...
@@ -76,10 +77,15 @@ namespace DeviceLibrary
...
@@ -76,10 +77,15 @@ namespace DeviceLibrary
plateH
=
from
.
Reel
.
PlateH
;
plateH
=
from
.
Reel
.
PlateH
;
From
=
from
.
clone
();
From
=
from
.
clone
();
To
=
to
.
clone
();
To
=
to
.
clone
();
MoveInfo
.
NewMove
(
MoveStep
.
StoreTS01
);
MoveInfo
.
NewMove
(
MoveStep
.
StoreTS01
);
MoveInfo
.
log
(
$
"{storeMoveType}:开始运输料盘,从:{from.posid},到:{to.posid}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:开始运输料盘,从:{from.posid},到:{to.posid}"
);
MoveInfo
.
MoveParam
.
PosID
=
$
"{From.posid}=>{To.posid}"
;
MoveInfo
.
MoveParam
.
PosID
=
$
"{From.posid}=>{To.posid}"
;
}
}
if
(
To
.
posid
==
BoxStorePosition
.
strings
)
{
Fix
=
BoxStorePosition
.
GetFixPos
(
Config
,
To
.
Reel
);
}
MoveInfo
.
MoveParam
.
WareCode
=
WareCode
;
MoveInfo
.
MoveParam
.
WareCode
=
WareCode
;
ErrMsgTxt
=
""
;
ErrMsgTxt
=
""
;
...
@@ -170,11 +176,46 @@ namespace DeviceLibrary
...
@@ -170,11 +176,46 @@ namespace DeviceLibrary
else
else
{
{
IgnoreX09
=
false
;
IgnoreX09
=
false
;
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS10
);
if
(
To
.
posid
==
BoxStorePosition
.
strings
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
)
&&
Fix
!=
null
)
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX01
);
else
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS10
);
MoveInfo
.
log
(
$
"{storeMoveType}:X30取到料"
);
MoveInfo
.
log
(
$
"{storeMoveType}:X30取到料"
);
InOutEndProcess
(
StoreMoveType
.
OutStore
,
From
.
posid
);
InOutEndProcess
(
StoreMoveType
.
OutStore
,
From
.
posid
);
}
}
break
;
break
;
case
MoveStep
.
StoreFIX01
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走机构到达目的地:{Fix.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{Fix.UpDown_PH}"
);
break
;
case
MoveStep
.
StoreFIX02
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX03
);
MoveInfo
.
log
(
$
"{storeMoveType}:进出轴到达目的地"
);
InOut_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
InOut_P2
,
Config
.
InOut_P2_speed
);
break
;
case
MoveStep
.
StoreFIX03
:
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
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴高点:{Fix.Comp_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地低点:{Fix.UpDown_PL}"
);
break
;
case
MoveStep
.
StoreFIX04
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Comp_PL
,
Config
.
Comp_P2_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P3_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}"
);
break
;
case
MoveStep
.
StoreFIX05
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS10
);
InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOut_P1
,
Config
.
InOut_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:进出轴到达待机点"
);
break
;
case
MoveStep
.
StoreTS10
:
case
MoveStep
.
StoreTS10
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS11
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS11
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
To
.
Middle_P2
,
Config
.
Middle_P2_speed
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
To
.
Middle_P2
,
Config
.
Middle_P2_speed
);
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
f27ffb8
...
@@ -169,7 +169,8 @@ namespace DeviceLibrary
...
@@ -169,7 +169,8 @@ namespace DeviceLibrary
UpDown_PL
=
Config
.
UpDown_P3
;
UpDown_PL
=
Config
.
UpDown_P3
;
posid
=
ngdoor
;
posid
=
ngdoor
;
}
}
else
{
else
if
(
storeSide
==
StoreSide
.
String
)
{
Middle_P2
=
Config
.
Middle_P1
;
Middle_P2
=
Config
.
Middle_P1
;
InOut_P2
=
Config
.
InOut_P3
;
InOut_P2
=
Config
.
InOut_P3
;
UpDown_PH
=
Config
.
UpDown_P4
;
UpDown_PH
=
Config
.
UpDown_P4
;
...
@@ -183,6 +184,16 @@ namespace DeviceLibrary
...
@@ -183,6 +184,16 @@ namespace DeviceLibrary
Reel
=
reel
.
clone
();
Reel
=
reel
.
clone
();
LogUtil
.
info
(
$
"BSP:{posid},Comp_PL:{Comp_PL}={reel.PlateH},Comp_PL_MM:{Config.Comp_PL_MM},{JsonHelper.SerializeObject(this)}"
);
LogUtil
.
info
(
$
"BSP:{posid},Comp_PL:{Comp_PL}={reel.PlateH},Comp_PL_MM:{Config.Comp_PL_MM},{JsonHelper.SerializeObject(this)}"
);
}
}
public
static
BoxStorePosition
GetFixPos
(
Robot_Config
Config
,
ReelParam
reel
)
{
var
fixpos
=
"fix#"
+
reel
.
PlateW
.
ToString
();
var
ac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
fixpos
);
if
(
ac
==
null
)
return
null
;
var
p
=
new
BoxStorePosition
(
Config
,
ac
,
reel
);
return
p
;
}
public
BoxStorePosition
clone
()
public
BoxStorePosition
clone
()
{
{
BoxStorePosition
dstobject
;
BoxStorePosition
dstobject
;
...
@@ -200,6 +211,7 @@ namespace DeviceLibrary
...
@@ -200,6 +211,7 @@ namespace DeviceLibrary
public
enum
StoreSide
public
enum
StoreSide
{
{
NGDoor
,
NGDoor
,
String
String
,
Fix
}
}
}
}
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
f27ffb8
...
@@ -285,9 +285,20 @@ namespace DeviceLibrary
...
@@ -285,9 +285,20 @@ namespace DeviceLibrary
switch
(
ResetMoveInfo
.
MoveStep
)
switch
(
ResetMoveInfo
.
MoveStep
)
{
{
case
MoveStep
.
H01_HomeReset
:
case
MoveStep
.
H01_HomeReset
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset_01
);
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
if
(
IOValue
(
IO_Type
.
StringBack_Check
)
==
IOValue
(
IO_Type
.
StringFront_Check
)
||
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
crc
.
GetString
(
L
.
string_not_onposition
,
"回原时X09,X10信号异常,料串可能不在正确位置,请检查."
),
MsgLevel
.
alarm
);
//0429
RobotManage
.
UserPause
(
"回原时X09,X10信号异常,料串可能不在正确位置,请检查"
);
return
;
}
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
))
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
LOW
);
break
;
case
MoveStep
.
H02_HomeReset_01
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset
);
ResetMoveInfo
.
log
(
"进出轴,批量轴回原,料串检测杆退回避让端"
);
ResetMoveInfo
.
log
(
"进出轴,批量轴回原,料串检测杆退回避让端"
);
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
InOut_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
InOut_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
Batch_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
Batch_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
...
@@ -310,8 +321,7 @@ namespace DeviceLibrary
...
@@ -310,8 +321,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
H04_HomeReset
:
case
MoveStep
.
H04_HomeReset
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H05_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H05_HomeReset
);
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
))
ResetMoveInfo
.
log
(
"夹爪轴,P1待机点"
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
LOW
);
Clamp_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Clamp_P1
,
Config
.
Clamp_P1_speed
);
Clamp_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Clamp_P1
,
Config
.
Clamp_P1_speed
);
ResetMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
ResetMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
break
;
break
;
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
f27ffb8
...
@@ -32,10 +32,13 @@ namespace DeviceLibrary
...
@@ -32,10 +32,13 @@ namespace DeviceLibrary
{
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelTaked
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelTaked
);
}
}
void
NGPuted
(
string
msg
)
public
void
NGPuted
(
string
msg
)
{
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_01
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_01
);
ClampMoveInfo
.
MoveParam
.
NgMsg
=
msg
;
if
(!
string
.
IsNullOrEmpty
(
msg
))
{
ClampMoveInfo
.
MoveParam
.
NgMsg
=
msg
;
}
ClampMoveInfo
.
MoveParam
.
IsNg
=
true
;
ClampMoveInfo
.
MoveParam
.
IsNg
=
true
;
}
}
/// <summary>
/// <summary>
...
@@ -238,10 +241,10 @@ namespace DeviceLibrary
...
@@ -238,10 +241,10 @@ namespace DeviceLibrary
}
}
break
;
break
;
case
MoveStep
.
NGOUT_03
:
case
MoveStep
.
NGOUT_03
:
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
if
(
IOValue
(
IO_Type
.
NGDoor_Tray_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
NGDoor_Tray_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
please_take_ngdoor_reel
,
"等待取走单口料盘"
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
please_take_ngdoor_reel
,
"等待取走单口料盘"
),
MsgLevel
.
alarm
);
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
RobotManage
.
UserPause
(
"等待取走单口料盘"
);
RobotManage
.
UserPause
(
"等待取走单口料盘"
);
}
}
else
else
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
f27ffb8
...
@@ -117,9 +117,13 @@ namespace DeviceLibrary
...
@@ -117,9 +117,13 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StoreOut10
:
case
MoveStep
.
StoreOut10
:
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut11
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut11
);
var
outac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
var
outFrom
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
var
outTo
=
new
BoxStorePosition
(
Config
,
StoreMoveInfo
.
MoveParam
.
IsNg
?
StoreSide
.
NGDoor
:
StoreSide
.
String
,
StoreMoveInfo
.
MoveParam
);
BoxStorePosition
outTo
;
boxTransport
.
Start
(
outac
==
null
?
null
:
new
BoxStorePosition
(
Config
,
outac
,
StoreMoveInfo
.
MoveParam
),
outTo
,
StoreMoveType
.
OutStore
);
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
);
else
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
String
,
StoreMoveInfo
.
MoveParam
);
boxTransport
.
Start
(
outFrom
==
null
?
null
:
new
BoxStorePosition
(
Config
,
outFrom
,
StoreMoveInfo
.
MoveParam
),
outTo
,
StoreMoveType
.
OutStore
);
StoreMoveInfo
.
log
(
$
"开始转运料盘{(StoreMoveInfo.MoveParam.IsNg?"
单料口
":"
料串
")}"
);
StoreMoveInfo
.
log
(
$
"开始转运料盘{(StoreMoveInfo.MoveParam.IsNg?"
单料口
":"
料串
")}"
);
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreExecute
);
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreExecute
);
break
;
break
;
...
@@ -143,6 +147,7 @@ namespace DeviceLibrary
...
@@ -143,6 +147,7 @@ namespace DeviceLibrary
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreEnd
);
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreEnd
);
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
{
{
NGPuted
(
StoreMoveInfo
.
MoveParam
.
NgMsg
);
NGPuted
(
StoreMoveInfo
.
MoveParam
.
NgMsg
);
OutSingleJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
OutSingleJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
}
}
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
f27ffb8
...
@@ -13,6 +13,7 @@ namespace DeviceLibrary
...
@@ -13,6 +13,7 @@ namespace DeviceLibrary
WaitErr
,
WaitErr
,
//回原流程
//回原流程
H01_HomeReset
,
H01_HomeReset
,
H02_HomeReset_01
,
H02_HomeReset
,
H02_HomeReset
,
H03_HomeReset
,
H03_HomeReset
,
H04_HomeReset
,
H04_HomeReset
,
...
@@ -126,6 +127,11 @@ namespace DeviceLibrary
...
@@ -126,6 +127,11 @@ namespace DeviceLibrary
StoreTS07
,
StoreTS07
,
StoreTS08
,
StoreTS08
,
StoreTS09
,
StoreTS09
,
StoreFIX01
,
StoreFIX02
,
StoreFIX03
,
StoreFIX04
,
StoreFIX05
,
StoreTS10
,
StoreTS10
,
StoreTS11
,
StoreTS11
,
StoreTS12
,
StoreTS12
,
...
@@ -135,6 +141,7 @@ namespace DeviceLibrary
...
@@ -135,6 +141,7 @@ namespace DeviceLibrary
StoreTS16
,
StoreTS16
,
StoreTS17
,
StoreTS17
,
StoreTS18
,
StoreTS18
,
}
}
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
f27ffb8
...
@@ -29,7 +29,14 @@ namespace DeviceLibrary
...
@@ -29,7 +29,14 @@ namespace DeviceLibrary
public
static
event
EventHandler
<
bool
>
UserPauseSet
;
public
static
event
EventHandler
<
bool
>
UserPauseSet
;
public
static
bool
isRunning
=
false
;
public
static
bool
isRunning
=
false
;
public
static
Dictionary
<
string
,
ACStorePosition
>
allPositionMap
{
get
=>
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
;
}
public
static
Dictionary
<
string
,
ACStorePosition
>
allPositionMap
{
get
=>
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
;
}
public
static
List
<
string
>
PositionNumList
{
get
=>
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
.
Keys
.
ToList
();
}
static
List
<
string
>
_positionNumList
=
null
;
public
static
List
<
string
>
PositionNumList
{
get
{
if
(
_positionNumList
==
null
)
_positionNumList
=
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
.
Keys
.
ToList
();
return
_positionNumList
;
}
}
static
string
baseDir
=
Application
.
StartupPath
;
static
string
baseDir
=
Application
.
StartupPath
;
static
Thread
mainThread
;
static
Thread
mainThread
;
...
@@ -49,13 +56,18 @@ namespace DeviceLibrary
...
@@ -49,13 +56,18 @@ namespace DeviceLibrary
if
(
File
.
Exists
(
positionConfigFile
))
if
(
File
.
Exists
(
positionConfigFile
))
{
{
LogUtil
.
info
(
"加载位置文件:"
+
positionConfigFile
);
LogUtil
.
info
(
"加载位置文件:"
+
positionConfigFile
);
CSVPositionReader
<
ACStorePosition
>.
Reloa
dCSVFile
(
positionConfigFile
);
CSVPositionReader
<
ACStorePosition
>.
Ad
dCSVFile
(
positionConfigFile
);
}
}
else
{
else
{
IsLoadOk
=
false
;
IsLoadOk
=
false
;
msg
+=
crc
.
GetString
(
L
.
cant_find_storeposfile
,
"找不到库位配置文件"
)+
"\n"
;
msg
+=
crc
.
GetString
(
L
.
cant_find_storeposfile
,
"找不到库位配置文件"
)+
"\n"
;
}
}
string
fixpositionConfigFile
=
Path
.
Combine
(
baseDir
,
"StoreConfig\\fixPositions.csv"
);
if
(
File
.
Exists
(
fixpositionConfigFile
))
{
LogUtil
.
info
(
"加载校准库位文件:"
+
fixpositionConfigFile
);
CSVPositionReader
<
ACStorePosition
>.
AddCSVFile
(
fixpositionConfigFile
);
}
CodeManager
.
LoadConfig
();
CodeManager
.
LoadConfig
();
mainMachine
=
new
MainMachine
(
RobotManage
.
Config
);
mainMachine
=
new
MainMachine
(
RobotManage
.
Config
);
...
...
DeviceLibrary/userControl/AxisMoveControl.cs
查看文件 @
f27ffb8
...
@@ -170,7 +170,7 @@ namespace DeviceLibrary
...
@@ -170,7 +170,7 @@ namespace DeviceLibrary
{
{
btnDelMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
btnDelMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
}
}
btnReadPosition_Click
(
null
,
null
);
//
btnReadPosition_Click(null, null);
}
}
private
void
btnComAlarmClear_Click
(
object
sender
,
EventArgs
e
)
private
void
btnComAlarmClear_Click
(
object
sender
,
EventArgs
e
)
...
@@ -305,7 +305,7 @@ namespace DeviceLibrary
...
@@ -305,7 +305,7 @@ namespace DeviceLibrary
{
{
btnAddMove
.
BackColor
=
Color
.
White
;
btnAddMove
.
BackColor
=
Color
.
White
;
AxisManager
.
SuddenStop
(
PortName
,
SlvAddr
);
AxisManager
.
SuddenStop
(
PortName
,
SlvAddr
);
btnReadPosition_Click
(
null
,
null
);
//
btnReadPosition_Click(null, null);
}
}
}
}
...
@@ -334,7 +334,7 @@ namespace DeviceLibrary
...
@@ -334,7 +334,7 @@ namespace DeviceLibrary
{
{
btnDelMove
.
BackColor
=
Color
.
White
;
btnDelMove
.
BackColor
=
Color
.
White
;
AxisManager
.
SuddenStop
(
PortName
,
SlvAddr
);
AxisManager
.
SuddenStop
(
PortName
,
SlvAddr
);
btnReadPosition_Click
(
null
,
null
);
//
btnReadPosition_Click(null, null);
}
}
}
}
...
@@ -406,6 +406,7 @@ namespace DeviceLibrary
...
@@ -406,6 +406,7 @@ namespace DeviceLibrary
short
value
=
HCBoardManager
.
GetHomeStatus
(
axisNo
);
short
value
=
HCBoardManager
.
GetHomeStatus
(
axisNo
);
string
homesstr
=
HCBoardManager
.
AxisHomeSts
(
value
);
string
homesstr
=
HCBoardManager
.
AxisHomeSts
(
value
);
lblhomeSts
.
Text
=
homesstr
;
lblhomeSts
.
Text
=
homesstr
;
btnReadPosition_Click
(
null
,
null
);
}
}
private
void
ShowlbSts
(
Label
lbl
,
int
value
,
bool
isAlarm
=
false
)
private
void
ShowlbSts
(
Label
lbl
,
int
value
,
bool
isAlarm
=
false
)
{
{
...
...
TheMachine/AxisControl.Designer.cs
查看文件 @
f27ffb8
...
@@ -59,7 +59,7 @@ namespace TheMachine
...
@@ -59,7 +59,7 @@ namespace TheMachine
this
.
configControl1
.
Config
=
null
;
this
.
configControl1
.
Config
=
null
;
this
.
configControl1
.
Location
=
new
System
.
Drawing
.
Point
(
568
,
3
);
this
.
configControl1
.
Location
=
new
System
.
Drawing
.
Point
(
568
,
3
);
this
.
configControl1
.
Name
=
"configControl1"
;
this
.
configControl1
.
Name
=
"configControl1"
;
this
.
configControl1
.
Size
=
new
System
.
Drawing
.
Size
(
647
,
55
9
);
this
.
configControl1
.
Size
=
new
System
.
Drawing
.
Size
(
647
,
55
3
);
this
.
configControl1
.
TabIndex
=
1
;
this
.
configControl1
.
TabIndex
=
1
;
this
.
configControl1
.
Tag
=
"not"
;
this
.
configControl1
.
Tag
=
"not"
;
//
//
...
...
TheMachine/Form1.Designer.cs
查看文件 @
f27ffb8
...
@@ -177,10 +177,10 @@ namespace TheMachine
...
@@ -177,10 +177,10 @@ namespace TheMachine
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
tabc
.
Controls
.
Add
(
this
.
tabP1
);
this
.
tabc
.
Controls
.
Add
(
this
.
tabP1
);
this
.
tabc
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
tabc
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
tabc
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
11
6
);
this
.
tabc
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
11
9
);
this
.
tabc
.
Name
=
"tabc"
;
this
.
tabc
.
Name
=
"tabc"
;
this
.
tabc
.
SelectedIndex
=
0
;
this
.
tabc
.
SelectedIndex
=
0
;
this
.
tabc
.
Size
=
new
System
.
Drawing
.
Size
(
1008
,
61
3
);
this
.
tabc
.
Size
=
new
System
.
Drawing
.
Size
(
1008
,
61
0
);
this
.
tabc
.
TabIndex
=
1
;
this
.
tabc
.
TabIndex
=
1
;
//
//
// tabP1
// tabP1
...
@@ -188,7 +188,7 @@ namespace TheMachine
...
@@ -188,7 +188,7 @@ namespace TheMachine
this
.
tabP1
.
Controls
.
Add
(
this
.
pnl
);
this
.
tabP1
.
Controls
.
Add
(
this
.
pnl
);
this
.
tabP1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
30
);
this
.
tabP1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
30
);
this
.
tabP1
.
Name
=
"tabP1"
;
this
.
tabP1
.
Name
=
"tabP1"
;
this
.
tabP1
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
57
9
);
this
.
tabP1
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
57
6
);
this
.
tabP1
.
TabIndex
=
0
;
this
.
tabP1
.
TabIndex
=
0
;
this
.
tabP1
.
Text
=
"信息"
;
this
.
tabP1
.
Text
=
"信息"
;
this
.
tabP1
.
UseVisualStyleBackColor
=
true
;
this
.
tabP1
.
UseVisualStyleBackColor
=
true
;
...
@@ -207,7 +207,7 @@ namespace TheMachine
...
@@ -207,7 +207,7 @@ namespace TheMachine
this
.
pnl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
pnl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
pnl
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
pnl
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
pnl
.
Name
=
"pnl"
;
this
.
pnl
.
Name
=
"pnl"
;
this
.
pnl
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
57
9
);
this
.
pnl
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
57
6
);
this
.
pnl
.
TabIndex
=
273
;
this
.
pnl
.
TabIndex
=
273
;
//
//
// groupBox1
// groupBox1
...
@@ -260,7 +260,7 @@ namespace TheMachine
...
@@ -260,7 +260,7 @@ namespace TheMachine
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
302
);
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
302
);
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
4
63
,
283
);
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
4
36
,
271
);
this
.
pictureBox2
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox2
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox2
.
TabIndex
=
270
;
this
.
pictureBox2
.
TabIndex
=
270
;
this
.
pictureBox2
.
TabStop
=
false
;
this
.
pictureBox2
.
TabStop
=
false
;
...
@@ -284,7 +284,7 @@ namespace TheMachine
...
@@ -284,7 +284,7 @@ namespace TheMachine
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
302
);
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
302
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
4
63
,
283
);
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
4
51
,
271
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox1
.
TabIndex
=
271
;
this
.
pictureBox1
.
TabIndex
=
271
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
pictureBox1
.
TabStop
=
false
;
...
@@ -371,10 +371,10 @@ namespace TheMachine
...
@@ -371,10 +371,10 @@ namespace TheMachine
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
729
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1008
,
729
);
this
.
Controls
.
Add
(
this
.
tabc
);
this
.
Controls
.
Add
(
this
.
listView1
);
this
.
Controls
.
Add
(
this
.
listView1
);
this
.
Controls
.
Add
(
this
.
btn_stop
);
this
.
Controls
.
Add
(
this
.
btn_stop
);
this
.
Controls
.
Add
(
this
.
btn_run
);
this
.
Controls
.
Add
(
this
.
btn_run
);
this
.
Controls
.
Add
(
this
.
tabc
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
MainMenuStrip
=
this
.
menuStrip1
;
...
...
TheMachine/Form1.cs
查看文件 @
f27ffb8
...
@@ -42,6 +42,7 @@ namespace TheMachine
...
@@ -42,6 +42,7 @@ namespace TheMachine
if
(
tabc
.
TabCount
>
tabpagecount
)
if
(
tabc
.
TabCount
>
tabpagecount
)
addTablePage
();
addTablePage
();
LanguageProcess
();
LanguageProcess
();
}
}
...
@@ -68,6 +69,9 @@ namespace TheMachine
...
@@ -68,6 +69,9 @@ namespace TheMachine
readonly
System
.
Windows
.
Forms
.
Timer
t1
=
new
System
.
Windows
.
Forms
.
Timer
();
readonly
System
.
Windows
.
Forms
.
Timer
t1
=
new
System
.
Windows
.
Forms
.
Timer
();
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
{
this
.
Width
=
Screen
.
PrimaryScreen
.
WorkingArea
.
Width
;
//获取主显⽰设备的桌⾯宽度
this
.
Height
=
Screen
.
PrimaryScreen
.
WorkingArea
.
Height
;
//获取主显⽰设备的桌⾯⾼度
List
<
CodeInfo
>
codeInfos
=
new
List
<
CodeInfo
>();
List
<
CodeInfo
>
codeInfos
=
new
List
<
CodeInfo
>();
//codeInfos.Add(new CodeInfo("", 528, 406));
//codeInfos.Add(new CodeInfo("", 528, 406));
codeInfos
.
Add
(
new
CodeInfo
(
""
,
925
,
520
));
codeInfos
.
Add
(
new
CodeInfo
(
""
,
925
,
520
));
...
...
TheMachine/IOControls.Designer.cs
查看文件 @
f27ffb8
...
@@ -174,6 +174,7 @@ namespace TheMachine
...
@@ -174,6 +174,7 @@ namespace TheMachine
//
//
// ioControl1
// ioControl1
//
//
this
.
ioControl1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ioControl1
.
Config
=
null
;
this
.
ioControl1
.
Config
=
null
;
this
.
ioControl1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ioControl1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ioControl1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ioControl1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
f27ffb8
...
@@ -37,6 +37,7 @@ namespace TheMachine
...
@@ -37,6 +37,7 @@ namespace TheMachine
this
.
lbl_hmdstate
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl_hmdstate
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
cb_usefixpos
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
tp
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
...
@@ -44,7 +45,7 @@ namespace TheMachine
...
@@ -44,7 +45,7 @@ namespace TheMachine
//
//
this
.
chbAutoRun
.
AutoSize
=
true
;
this
.
chbAutoRun
.
AutoSize
=
true
;
this
.
tp
.
SetColumnSpan
(
this
.
chbAutoRun
,
2
);
this
.
tp
.
SetColumnSpan
(
this
.
chbAutoRun
,
2
);
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
1
30
);
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
1
66
);
this
.
chbAutoRun
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
chbAutoRun
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
chbAutoRun
.
Name
=
"chbAutoRun"
;
this
.
chbAutoRun
.
Name
=
"chbAutoRun"
;
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
...
@@ -113,12 +114,13 @@ namespace TheMachine
...
@@ -113,12 +114,13 @@ namespace TheMachine
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tp
.
Controls
.
Add
(
this
.
label_tempsensor
,
0
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
label_tempsensor
,
0
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
cb_tempsensorport
,
1
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
cb_tempsensorport
,
1
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
chbAutoRun
,
0
,
6
);
this
.
tp
.
Controls
.
Add
(
this
.
button_positiontool
,
0
,
5
);
this
.
tp
.
Controls
.
Add
(
this
.
button_positiontool
,
0
,
5
);
this
.
tp
.
Controls
.
Add
(
this
.
lbl_hmdstate
,
0
,
4
);
this
.
tp
.
Controls
.
Add
(
this
.
lbl_hmdstate
,
0
,
4
);
this
.
tp
.
Controls
.
Add
(
this
.
cb_usefixpos
,
0
,
6
);
this
.
tp
.
Controls
.
Add
(
this
.
chbAutoRun
,
0
,
7
);
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
tp
.
Name
=
"tp"
;
this
.
tp
.
Name
=
"tp"
;
this
.
tp
.
RowCount
=
7
;
this
.
tp
.
RowCount
=
9
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
...
@@ -126,9 +128,23 @@ namespace TheMachine
...
@@ -126,9 +128,23 @@ namespace TheMachine
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
266
,
156
);
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
266
,
192
);
this
.
tp
.
TabIndex
=
6
;
this
.
tp
.
TabIndex
=
6
;
//
//
// cb_usefixpos
//
this
.
cb_usefixpos
.
AutoSize
=
true
;
this
.
tp
.
SetColumnSpan
(
this
.
cb_usefixpos
,
2
);
this
.
cb_usefixpos
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
130
);
this
.
cb_usefixpos
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
cb_usefixpos
.
Name
=
"cb_usefixpos"
;
this
.
cb_usefixpos
.
Size
=
new
System
.
Drawing
.
Size
(
96
,
16
);
this
.
cb_usefixpos
.
TabIndex
=
6
;
this
.
cb_usefixpos
.
Text
=
"启用校准库位"
;
this
.
cb_usefixpos
.
UseVisualStyleBackColor
=
true
;
//
// SettingControl
// SettingControl
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
@@ -151,5 +167,6 @@ namespace TheMachine
...
@@ -151,5 +167,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
Label
lbl_hmdstate
;
private
System
.
Windows
.
Forms
.
Label
lbl_hmdstate
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_usefixpos
;
}
}
}
}
TheMachine/SettingControl.cs
查看文件 @
f27ffb8
...
@@ -48,6 +48,7 @@ namespace TheMachine
...
@@ -48,6 +48,7 @@ namespace TheMachine
Config
.
PropertyBind
(
"Device_Humiture_Port"
,
cb_tempsensorport
,
"SelectedItem"
,
"SelectedIndexChanged"
);
Config
.
PropertyBind
(
"Device_Humiture_Port"
,
cb_tempsensorport
,
"SelectedItem"
,
"SelectedIndexChanged"
);
Config
.
PropertyBind
(
"Device_Use_Fixpos"
,
cb_usefixpos
,
"Checked"
,
"CheckedChanged"
);
}
}
...
...
TheMachine/UC/ConfigControl.cs
查看文件 @
f27ffb8
...
@@ -26,6 +26,7 @@ namespace TheMachine
...
@@ -26,6 +26,7 @@ namespace TheMachine
if
(
value
==
null
)
if
(
value
==
null
)
return
;
return
;
_Config
=
value
;
_Config
=
value
;
LoadPosList
();
LoadPosList
();
}
}
}
}
...
@@ -38,12 +39,35 @@ namespace TheMachine
...
@@ -38,12 +39,35 @@ namespace TheMachine
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
{
if
(
Config
!=
null
)
if
(
Config
==
null
)
LoadPosList
();
return
;
LoadPosList
();
}
}
void
LoadPosList
()
void
LoadPosList
()
{
{
if
(!
this
.
Created
)
return
;
if
(
this
.
InvokeRequired
)
{
this
.
Invoke
((
EventHandler
)
delegate
{
try
{
LoadPosList
();
}
catch
(
Exception
ee
)
{
MessageBox
.
Show
(
"LoadPosList:"
+
ee
.
ToString
());
}
});
return
;
}
tableLayoutPanel1
.
SuspendLayout
();
int
maxrow
=
tableLayoutPanel1
.
Height
/
34
;
int
maxrow
=
tableLayoutPanel1
.
Height
/
34
;
tableLayoutPanel1
.
Controls
.
Clear
();
tableLayoutPanel1
.
Controls
.
Clear
();
this
.
tableLayoutPanel1
.
RowStyles
.
Clear
();
this
.
tableLayoutPanel1
.
RowStyles
.
Clear
();
...
@@ -146,6 +170,7 @@ namespace TheMachine
...
@@ -146,6 +170,7 @@ namespace TheMachine
Label
button1
=
new
Label
();
Label
button1
=
new
Label
();
tableLayoutPanel1
.
Controls
.
Add
(
button1
,
c
,
r
++);
tableLayoutPanel1
.
Controls
.
Add
(
button1
,
c
,
r
++);
}
}
tableLayoutPanel1
.
ResumeLayout
(
true
);
}
}
private
void
TextBox_TextChanged
(
object
sender
,
EventArgs
e
)
private
void
TextBox_TextChanged
(
object
sender
,
EventArgs
e
)
...
...
TheMachine/UC/IOControl.cs
查看文件 @
f27ffb8
...
@@ -26,7 +26,14 @@ namespace TheMachine
...
@@ -26,7 +26,14 @@ namespace TheMachine
if
(
value
==
null
)
if
(
value
==
null
)
return
;
return
;
_Config
=
value
;
_Config
=
value
;
LoadIOList
();
try
{
LoadIOList
();
}
catch
(
Exception
ee
)
{
MessageBox
.
Show
(
"Config LoadIOList:"
+
ee
.
ToString
());
}
}
}
}
}
readonly
Timer
t1
=
new
Timer
();
readonly
Timer
t1
=
new
Timer
();
...
@@ -59,12 +66,19 @@ namespace TheMachine
...
@@ -59,12 +66,19 @@ namespace TheMachine
if
(
DesignMode
)
if
(
DesignMode
)
return
;
return
;
OnlineStore
.
CodeResourceControl
.
LanguageProcess
(
this
);
OnlineStore
.
CodeResourceControl
.
LanguageProcess
(
this
);
LoadIOList
();
}
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
this
.
Invoke
((
EventHandler
)
delegate
{
{
if
(
state
)
{
LoadIOList
();
}
try
{
LoadIOList
();
}
catch
(
Exception
ee
)
{
MessageBox
.
Show
(
"CodeResourceControl_LanguageChange LoadIOList:"
+
ee
.
ToString
());
}
});
}
}
private
void
T1_Tick
(
object
sender
,
EventArgs
e
)
private
void
T1_Tick
(
object
sender
,
EventArgs
e
)
...
@@ -77,6 +91,7 @@ namespace TheMachine
...
@@ -77,6 +91,7 @@ namespace TheMachine
private
void
LoadIOList
()
private
void
LoadIOList
()
{
{
t1
.
Stop
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
DIControlList
.
Clear
();
DIControlList
.
Clear
();
DOControlList
.
Clear
();
DOControlList
.
Clear
();
...
...
TheMachine/UC/StorePosControl.cs
查看文件 @
f27ffb8
...
@@ -39,7 +39,23 @@ namespace TheMachine
...
@@ -39,7 +39,23 @@ namespace TheMachine
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
{
LoadPos
(
_aCStorePosition
);
if
(!
this
.
Created
)
return
;
this
.
Invoke
((
EventHandler
)
delegate
{
try
{
LoadPos
(
_aCStorePosition
);
}
catch
(
Exception
ee
)
{
MessageBox
.
Show
(
"Crc_LanguageChangeEvent LoadPos:"
+
ee
.
ToString
());
}
});
}
}
private
ACStorePosition
_aCStorePosition
;
private
ACStorePosition
_aCStorePosition
;
public
void
LoadPos
(
ACStorePosition
aCStorePosition
)
public
void
LoadPos
(
ACStorePosition
aCStorePosition
)
...
...
TheMachine/UC/uc_boxdebug.Designer.cs
查看文件 @
f27ffb8
...
@@ -40,6 +40,7 @@ namespace TheMachine
...
@@ -40,6 +40,7 @@ namespace TheMachine
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
label_verify
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_verify
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cb_fixpos
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
storePosControl1
=
new
TheMachine
.
StorePosControl
();
this
.
storePosControl1
=
new
TheMachine
.
StorePosControl
();
this
.
groupInout
.
SuspendLayout
();
this
.
groupInout
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
...
@@ -169,6 +170,17 @@ namespace TheMachine
...
@@ -169,6 +170,17 @@ namespace TheMachine
this
.
label_verify
.
Tag
=
"not"
;
this
.
label_verify
.
Tag
=
"not"
;
this
.
label_verify
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
this
.
label_verify
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
//
// cb_fixpos
//
this
.
cb_fixpos
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_fixpos
.
FormattingEnabled
=
true
;
this
.
cb_fixpos
.
Location
=
new
System
.
Drawing
.
Point
(
266
,
489
);
this
.
cb_fixpos
.
Name
=
"cb_fixpos"
;
this
.
cb_fixpos
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
20
);
this
.
cb_fixpos
.
TabIndex
=
226
;
this
.
cb_fixpos
.
Tag
=
"not"
;
this
.
cb_fixpos
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_fixpos_SelectedIndexChanged
);
//
// storePosControl1
// storePosControl1
//
//
this
.
storePosControl1
.
Config
=
null
;
this
.
storePosControl1
.
Config
=
null
;
...
@@ -184,6 +196,7 @@ namespace TheMachine
...
@@ -184,6 +196,7 @@ namespace TheMachine
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Controls
.
Add
(
this
.
cb_fixpos
);
this
.
Controls
.
Add
(
this
.
label_verify
);
this
.
Controls
.
Add
(
this
.
label_verify
);
this
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
Controls
.
Add
(
this
.
label_size
);
this
.
Controls
.
Add
(
this
.
label_size
);
...
@@ -213,5 +226,6 @@ namespace TheMachine
...
@@ -213,5 +226,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
CheckBox
cb_inoutdebugmode
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_inoutdebugmode
;
private
System
.
Windows
.
Forms
.
Button
btn_autoinout
;
private
System
.
Windows
.
Forms
.
Button
btn_autoinout
;
private
System
.
Windows
.
Forms
.
Label
label_verify
;
private
System
.
Windows
.
Forms
.
Label
label_verify
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_fixpos
;
}
}
}
}
TheMachine/UC/uc_boxdebug.cs
查看文件 @
f27ffb8
...
@@ -122,6 +122,7 @@ namespace TheMachine
...
@@ -122,6 +122,7 @@ namespace TheMachine
return
-
1
;
return
-
1
;
if
(
b
.
StartsWith
(
"fix"
))
if
(
b
.
StartsWith
(
"fix"
))
return
1
;
return
1
;
string
[]
pa
=
a
.
Split
(
'_'
);
string
[]
pa
=
a
.
Split
(
'_'
);
string
[]
pb
=
b
.
Split
(
'_'
);
string
[]
pb
=
b
.
Split
(
'_'
);
...
@@ -217,7 +218,7 @@ namespace TheMachine
...
@@ -217,7 +218,7 @@ namespace TheMachine
LoadPosCheck
();
LoadPosCheck
();
Comparison
<
string
>
comparison
=
new
Comparison
<
string
>(
PosCompare
);
Comparison
<
string
>
comparison
=
new
Comparison
<
string
>(
PosCompare
);
RobotManage
.
PositionNumList
.
Sort
(
comparison
);
RobotManage
.
PositionNumList
.
Sort
(
comparison
);
//store.PositionNumList.Reverse();
string
[]
posstr
=
RobotManage
.
PositionNumList
[
RobotManage
.
PositionNumList
.
Count
-
1
].
Split
(
'_'
);
string
[]
posstr
=
RobotManage
.
PositionNumList
[
RobotManage
.
PositionNumList
.
Count
-
1
].
Split
(
'_'
);
int
colcount
=
0
;
int
colcount
=
0
;
...
@@ -239,13 +240,17 @@ namespace TheMachine
...
@@ -239,13 +240,17 @@ namespace TheMachine
int
currentRowIndex
=
0
;
int
currentRowIndex
=
0
;
int
lastcol
=
-
1
;
int
lastcol
=
-
1
;
string
lastAB
=
""
;
string
lastAB
=
""
;
cb_fixpos
.
Items
.
Clear
();
for
(
int
i
=
0
;
i
<
RobotManage
.
PositionNumList
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
RobotManage
.
PositionNumList
.
Count
;
i
++)
{
{
int
ci
=
RobotManage
.
PositionNumList
.
Count
-
1
-
i
;
int
ci
=
RobotManage
.
PositionNumList
.
Count
-
1
-
i
;
string
posname
=
RobotManage
.
PositionNumList
[
ci
];
string
posname
=
RobotManage
.
PositionNumList
[
ci
];
if
(
posname
.
StartsWith
(
"fix"
))
if
(
posname
.
StartsWith
(
"fix"
))
{
cb_fixpos
.
Items
.
Add
(
posname
);
continue
;
continue
;
}
string
[]
_posstr
=
posname
.
Split
(
'_'
);
string
[]
_posstr
=
posname
.
Split
(
'_'
);
int
col
=
0
;
int
col
=
0
;
if
(!
int
.
TryParse
(
_posstr
[
1
],
out
col
))
if
(!
int
.
TryParse
(
_posstr
[
1
],
out
col
))
...
@@ -304,6 +309,7 @@ namespace TheMachine
...
@@ -304,6 +309,7 @@ namespace TheMachine
else
else
setData
(
RobotManage
.
PositionNumList
.
Last
());
setData
(
RobotManage
.
PositionNumList
.
Last
());
checkVerify
();
checkVerify
();
}
}
void
setData
(
string
posid
)
{
void
setData
(
string
posid
)
{
ACStorePosition
ktkPosition
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posid
);
ACStorePosition
ktkPosition
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posid
);
...
@@ -448,5 +454,11 @@ namespace TheMachine
...
@@ -448,5 +454,11 @@ namespace TheMachine
//RobotManage.DisableUpdownProtect = cb_disableupdownprotect.Checked;
//RobotManage.DisableUpdownProtect = cb_disableupdownprotect.Checked;
//LogUtil.info("手动点击屏蔽升降轴旋转轴安全检测:"+ cb_disableupdownprotect.Checked.ToString());
//LogUtil.info("手动点击屏蔽升降轴旋转轴安全检测:"+ cb_disableupdownprotect.Checked.ToString());
}
}
private
void
cb_fixpos_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
if
(
cb_fixpos
.
SelectedItem
!=
null
)
setData
(
cb_fixpos
.
SelectedItem
.
ToString
());
}
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论