Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3aae5c39
由
张东亮
编写于
2023-01-09 09:32:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加校准库位缓存、出入库状态上报逻辑修改
1 个父辈
0445b5a6
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
139 行增加
和
63 行删除
Common/Common.csproj
Common/Setting_Init.cs
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/RobotManage.cs
LoadCVSLibrary/LoadCSVLibrary.csproj
TheMachine/TheMachine.csproj
Common/Common.csproj
查看文件 @
3aae5c3
...
...
@@ -38,7 +38,7 @@
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\增广夹爪\Rmaxis\bin\Debug
\log4net.dll</HintPath>
<HintPath>..\
DLL
\log4net.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>
...
...
Common/Setting_Init.cs
查看文件 @
3aae5c3
...
...
@@ -96,5 +96,7 @@ namespace OnlineStore.Common
public
static
MyConfig
<
int
>
CameraScan_QRCodeCount
=
3
;
[
MyConfigComment
(
"二维码扫码超时毫秒"
)]
public
static
MyConfig
<
int
>
CameraScan_CodeTimeOut
=
3000
;
[
MyConfigComment
(
"校准库位料盘缓存"
)]
public
static
MyConfig
<
string
>
FixBuffInfo
=
""
;
}
}
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
3aae5c3
...
...
@@ -34,26 +34,26 @@
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\Asa.Camera.VisionLib.dll</HintPath>
<HintPath>..\DLL\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary, Version=1.0.8406.19246, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\CodeLibrary.dll</HintPath>
<HintPath>..\DLL\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\ConfigHelper.dll</HintPath>
<HintPath>..\DLL\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\halcondotnet.dll</HintPath>
<HintPath>..\DLL\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HuichuanLibrary">
<HintPath>..\
..\HuichuanLibrary\HuichuanLibrary\bin\Debug
\HuichuanLibrary.dll</HintPath>
<HintPath>..\
DLL
\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\log4net.dll</HintPath>
<HintPath>..\DLL\log4net.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>
...
...
@@ -62,6 +62,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
3aae5c3
...
...
@@ -124,8 +124,14 @@ namespace DeviceLibrary
Operation
operation
=
getLineBoxStatus
();
if
(!
string
.
IsNullOrEmpty
(
posid
))
operation
.
boxStatus
[
StoreID
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
operation
.
boxStatus
[
StoreID
].
status
=
(
int
)
storeStatus
;
if
(
storeStatus
==
StoreStatus
.
OutStoreEnd
||
storeStatus
==
StoreStatus
.
OutStoreBoxEnd
||
storeStatus
==
StoreStatus
.
InStoreEnd
)
{
}
else
operation
.
boxStatus
[
StoreID
].
status
=
(
int
)
storeStatus
;
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
if
(
RobotManage
.
InoutDebugMode
)
...
...
@@ -145,13 +151,16 @@ namespace DeviceLibrary
LogUtil
.
info
(
$
"SendStoreState success,posid:{posid}, storeStatus:{storeStatus}"
);
ResultProcess
(
resultOperation
);
if
(
storeStatus
==
StoreStatus
.
OutStoreEnd
||
storeStatus
==
StoreStatus
.
OutStoreBoxEnd
||
storeStatus
==
StoreStatus
.
InStoreEnd
)
//if (storeStatus == StoreStatus.OutStoreEnd ||
// storeStatus == StoreStatus.OutStoreBoxEnd ||
// storeStatus == StoreStatus.InStoreEnd)
//{
// this.storeStatus = StoreStatus.StoreOnline;
//}
if
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
this
.
storeStatus
=
StoreStatus
.
StoreOnline
;
}
}
return
true
;
}
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
3aae5c3
...
...
@@ -248,6 +248,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StoreFIX04
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
RobotManage
.
PutReelInFixPos
(
MoveInfo
.
MoveParam
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Comp_PL
,
Config
.
Comp_P2_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P3_speed
/
2
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"
);
...
...
@@ -260,6 +261,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StoreTS10
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS11
);
RobotManage
.
ClearReelInFixPos
();
Middle_Axis
.
AbsMove
(
MoveInfo
,
To
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走机构到达目的地:{To.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
To
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
3aae5c3
...
...
@@ -20,7 +20,8 @@ namespace DeviceLibrary
get
{
return
_canRunning
;
}
set
{
if
(
_canRunning
!=
value
)
{
if
(
_canRunning
!=
value
)
{
Msg
.
setlogones
();
}
_canRunning
=
value
;
...
...
@@ -70,11 +71,12 @@ namespace DeviceLibrary
public
MainMachine
(
Robot_Config
_config
)
{
public
MainMachine
(
Robot_Config
_config
)
{
Config
=
_config
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
StringMoveInfo
=
new
MoveInfo
(
"料串进出机构"
);
StringMoveInfo
.
SetStateDelegate
(
StringProcessState
);
StringMoveInfo
.
SetStateDelegate
(
StringProcessState
);
ClampMoveInfo
=
new
MoveInfo
(
"取放料机构"
);
ClampMoveInfo
.
SetStateDelegate
(
ClampState
);
StoreMoveInfo
=
new
MoveInfo
(
"进出库调度"
);
...
...
@@ -83,10 +85,10 @@ namespace DeviceLibrary
AIOTMoveInfo
=
new
MoveInfo
(
"出入库测试"
);
#
region
初始化
led
灯
RunningLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Run_Led
].
GetIOAddr
(),
LedColor
.
green
);
RunningLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Run_Led
].
GetIOAddr
(),
LedColor
.
green
);
StandbyLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Standby_Led
].
GetIOAddr
(),
LedColor
.
yellow
);
AlarmLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
(),
LedColor
.
red
);
//NG_Led = new Led(Config.DOList[IO_Type.MaterialNG_Led].GetIOAddr());
#
endregion
#
region
初始化伺服轴
...
...
@@ -109,10 +111,10 @@ namespace DeviceLibrary
{
InOutEndProcessEvent
?.
Invoke
(
posid
,
storeMoveType
,
arg4
);
};
AlarmBuzzer
.
SetOnOffAction
(()
=>{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
HIGH
);
},
()
=>
{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
LOW
);
});
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
.
Reset_BTN
,
Config
,
IO_VALUE
.
HIGH
,
Reset_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
AutoRun_Single
,
Config
,
IO_VALUE
.
HIGH
,
Run_BTN
,
2500
,
100
);
LedProcessInit
();
}
...
...
@@ -120,7 +122,7 @@ namespace DeviceLibrary
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
StringMoveInfo
.
Name
=
crc
.
GetString
(
L
.
string_inout_equipment
,
"料串进出机构"
);
StringMoveInfo
.
Name
=
crc
.
GetString
(
L
.
string_inout_equipment
,
"料串进出机构"
);
ClampMoveInfo
.
Name
=
crc
.
GetString
(
L
.
clamp_equipment
,
"取放料机构"
);
StoreMoveInfo
.
Name
=
crc
.
GetString
(
L
.
store_manage_equipment
,
"进出库调度"
);
ResetMoveInfo
.
Name
=
crc
.
GetString
(
L
.
reset_equipment
,
"重置"
);
...
...
@@ -134,13 +136,14 @@ namespace DeviceLibrary
if
(
IOValue
(
IO_Type
.
ClampingDisc_Up
).
Equals
(
IO_VALUE
.
HIGH
))
return
(
false
,
""
);
var
ismiddleatdoor
=
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P1
)
||
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P2
)
||
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P3
);
if
(!
ismiddleatdoor
)
return
(
false
,
""
);
var
isupdownindoor
=
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P1
)
||
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P2
)
||
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P3
)
||
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P4
)
||
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P5
);
if
(
isupdownindoor
)
{
if
(
isupdownindoor
)
{
return
(
true
,
crc
.
GetString
(
L
.
InOut_Axis_interference_01
,
"夹爪取料气缸不在上端,进出轴不可运动"
));
}
...
...
@@ -171,10 +174,12 @@ namespace DeviceLibrary
/// <summary>
/// 整机启动变量,设置为false后将退出线程,只在停止时调用
/// </summary>
bool
mstart
=
true
;
public
void
Run
()
{
bool
mstart
=
true
;
public
void
Run
()
{
mstart
=
true
;
while
(
mstart
)
{
while
(
mstart
)
{
try
{
canRunning
=
DeviceCheck
();
...
...
@@ -209,11 +214,12 @@ namespace DeviceLibrary
Msg
.
add
(
ex
.
ToString
(),
MsgLevel
.
warning
);
Msg
.
setlogones
();
}
finally
{
finally
{
var
m
=
Msg
.
get
();
ProcessMsgEvent
?.
Invoke
(
m
);
ServerCM
.
ProcessMsg
(
m
);
StoreStatus
currnetstoreStatus
=
StoreStatus
.
None
;
StoreStatus
currnetstoreStatus
=
StoreStatus
.
None
;
if
(
m
.
Find
((
aa
)
=>
aa
.
msgLevel
==
MsgLevel
.
alarm
)
==
null
)
{
hasAlarm
=
false
;
...
...
@@ -226,7 +232,8 @@ namespace DeviceLibrary
currnetstoreStatus
=
StoreStatus
.
StoreOnline
;
}
}
else
{
else
{
hasAlarm
=
true
;
AlarmBuzzer
.
ON
();
currnetstoreStatus
=
isInSuddenDown
?
StoreStatus
.
SuddenStop
:
StoreStatus
.
Warning
;
...
...
@@ -237,17 +244,19 @@ namespace DeviceLibrary
else
currnetstoreStatus
=
StoreStatus
.
Debugging
;
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
ServerCM
.
storeStatus
=
currnetstoreStatus
;
}
}
LogUtil
.
info
(
"主线程已退出."
);
}
public
void
Start
()
{
public
void
Start
()
{
ServerCM
.
StartConnectServer
();
Run
();
}
public
void
Stop
()
{
public
void
Stop
()
{
mstart
=
false
;
AutoInOutTest
=
false
;
ServerCM
.
StopConnectServer
();
...
...
@@ -258,7 +267,8 @@ namespace DeviceLibrary
}
public
void
BeginHomeReset
(
bool
firstRun
=
false
)
{
public
void
BeginHomeReset
(
bool
firstRun
=
false
)
{
if
(!
firstRun
)
{
StopMove
();
...
...
@@ -273,7 +283,7 @@ namespace DeviceLibrary
ResetMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
//强制回原
bool
forceHome
=
true
;
bool
forceHome
=
true
;
void
HomeReset
()
{
if
(
CheckWait
(
ResetMoveInfo
))
...
...
@@ -283,14 +293,15 @@ namespace DeviceLibrary
{
case
MoveStep
.
H01_HomeReset
:
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
if
(
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
"批量门没有关闭,无法复位,请关闭批量门"
,
MsgLevel
.
alarm
);
return
;
}
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
BatchDoor_Close
,
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
LOW
);
Msg
.
add
(
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset_01
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset_01
);
break
;
case
MoveStep
.
H02_HomeReset_01
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset
);
...
...
@@ -305,12 +316,12 @@ namespace DeviceLibrary
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
ClampingDisc_Up
,
IO_Type
.
ClampingDisc_Down
,
IO_VALUE
.
LOW
);
ResetMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
break
;
case
MoveStep
.
H03_HomeReset
:
case
MoveStep
.
H03_HomeReset
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H04_HomeReset
);
ResetMoveInfo
.
log
(
"旋转轴,升降轴,回原,料叉P1待机点"
);
InOut_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
InOut_P1
,
Config
.
InOut_P1_speed
);
Middle_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
UpDown_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
UpDown_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
//OpenFlipDoor(ResetMoveInfo);
break
;
case
MoveStep
.
H04_HomeReset
:
...
...
@@ -328,7 +339,7 @@ namespace DeviceLibrary
case
MoveStep
.
H06_HomeReset
:
ResetMoveInfo
.
log
(
"压紧轴回原"
);
if
(
AxisManager
.
GetAlarmStatus
(
Comp_Axis
.
Config
.
DeviceName
,
Comp_Axis
.
Config
.
GetAxisValue
())
==
1
)
{
{
AxisManager
.
AlarmClear
(
Comp_Axis
.
Config
.
DeviceName
,
Comp_Axis
.
Config
.
GetAxisValue
());
Msg
.
add
(
"压紧轴报警无法回原,请手动取出取料叉上的物料"
,
MsgLevel
.
alarm
);
SingleDoor
.
ToHigh
(
null
);
...
...
@@ -342,7 +353,8 @@ namespace DeviceLibrary
}
break
;
case
MoveStep
.
H07_HomeReset
:
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H12_HomeReset
);
ResetMoveInfo
.
log
(
"料叉上有料,送到NG口"
);
Middle_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Middle_P2
,
Config
.
Middle_P2_speed
);
...
...
@@ -350,11 +362,11 @@ namespace DeviceLibrary
}
else
if
(
IOValue
(
IO_Type
.
WidthCheck_7
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
WidthCheck_13
).
Equals
(
IO_VALUE
.
HIGH
)
)
IOValue
(
IO_Type
.
WidthCheck_13
).
Equals
(
IO_VALUE
.
HIGH
))
{
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H08_HomeReset
);
ResetMoveInfo
.
log
(
"夹爪上有料盘,送到NG口"
);
}
else
{
...
...
@@ -405,7 +417,8 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
L
.
x29_higt_has_reel
,
"系统启动X29检测到有无信息料盘,等待取走单料口料盘"
),
MsgLevel
.
alarm
);
RobotManage
.
UserPause
(
"系统启动X29检测到有无信息料盘,等待取走单料口料盘"
);
}
else
{
else
{
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H15_HomeReset
);
ResetMoveInfo
.
log
(
"料盘已取走"
);
}
...
...
@@ -415,7 +428,7 @@ namespace DeviceLibrary
{
Msg
.
add
(
crc
.
GetString
(
L
.
wait_put_reel_into_ngdoor
,
"等待阻挡物离开光栅"
),
MsgLevel
.
warning
);
}
else
else
{
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H16_HomeReset
);
}
...
...
@@ -446,27 +459,43 @@ namespace DeviceLibrary
boxTransport
.
Reset
();
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
EndMove
();
if
((
RobotManage
.
HasReelInFixPos
(
out
ReelParam
reelParam
))
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
))
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut_NGPre
);
StoreMoveInfo
.
MoveParam
=
reelParam
.
clone
();
StoreMoveInfo
.
MoveParam
.
PosID
=
"NG"
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
"检测到校准库位有料盘信息,请人工确认"
;
StoreMoveInfo
.
log
(
$
"开始校准库位料盘出库"
);
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
//CloseFlipDoor(StoreMoveInfo);
}
runStatus
=
RunStatus
.
Running
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
break
;
}
}
bool
_IgnoreSafecheck
=
false
;
public
bool
IgnoreSafecheck
{
get
=>
_IgnoreSafecheck
;
set
{
public
bool
IgnoreSafecheck
{
get
=>
_IgnoreSafecheck
;
set
{
if
(
value
)
{
IOMove
(
IO_Type
.
DoorSafe_Disable
,
IO_VALUE
.
HIGH
);
}
else
{
else
{
IOMove
(
IO_Type
.
DoorSafe_Disable
,
IO_VALUE
.
LOW
);
}
_IgnoreSafecheck
=
value
;
}
}
_IgnoreSafecheck
=
value
;
}
}
public
bool
IgnoreGratingSignal
=
false
;
bool
lastSafeCheckStatus
=
true
;
bool
SafeCheck
()
{
bool
SafeCheck
()
{
bool
ok
=
true
;
var
ignorestring
=
"["
+
crc
.
GetString
(
L
.
ignored
,
"已忽略"
)
+
"]"
;
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
LOW
))
...
...
@@ -504,7 +533,8 @@ namespace DeviceLibrary
return
ok
;
}
void
DeviceSuddenStop
()
{
void
DeviceSuddenStop
()
{
if
(
lastSafeCheckStatus
)
{
AxisBean
.
StopMultiAxis
(
AxisBean
.
List
);
...
...
@@ -523,7 +553,8 @@ namespace DeviceLibrary
DateTime
lastAirCloseTime
=
DateTime
.
MinValue
;
internal
DateTime
checkAlarmTime
=
DateTime
.
Now
;
public
bool
DeviceCheck
()
{
public
bool
DeviceCheck
()
{
bool
ok
=
true
;
isInSuddenDown
=
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
);
if
(
UserPause
)
...
...
@@ -540,14 +571,15 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
L
.
in_suddenstop
,
"急停中"
),
MsgLevel
.
alarm
);
ok
=
false
;
}
else
if
(
alarmType
!=
AlarmType
.
None
)
{
else
if
(
alarmType
!=
AlarmType
.
None
)
{
//if (IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH))
//{
// Alarm(AlarmType.None);
//}
//else
{
Msg
.
add
(
crc
.
GetString
(
L
.
system_need_reset
,
"系统需要重置"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
Msg
.
add
(
crc
.
GetString
(
L
.
system_need_reset
,
"系统需要重置"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
ButtenEvent
?.
Invoke
(
null
,
ErrInfo
.
SuddenStop
);
ok
=
false
;
}
...
...
@@ -569,10 +601,11 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
L
.
airpressure_not_enough
,
"气压不足"
),
MsgLevel
.
warning
);
}
}
else
{
else
{
lastAirCloseTime
=
DateTime
.
MinValue
;
}
if
(
alarmType
!=
AlarmType
.
SuddenStop
)
if
(
alarmType
!=
AlarmType
.
SuddenStop
)
{
TimeSpan
span
=
DateTime
.
Now
-
checkAlarmTime
;
if
(
span
.
TotalSeconds
>
2
)
...
...
@@ -610,7 +643,8 @@ namespace DeviceLibrary
return
ok
;
}
public
void
IgnoreX09
()
{
public
void
IgnoreX09
()
{
boxTransport
.
IgnoreX09
=
true
;
LogUtil
.
info
(
"按下X09忽略"
);
}
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
3aae5c3
...
...
@@ -180,6 +180,34 @@ namespace DeviceLibrary
else
LogUtil
.
info
(
"用户取消忽略安全光栅"
);
}
#
region
校准库位缓存
public
static
bool
HasReelInFixPos
(
out
ReelParam
reelParam
)
{
reelParam
=
null
;
try
{
string
fix
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
FixBuffInfo
,
""
);
if
(!
string
.
IsNullOrEmpty
(
fix
))
{
reelParam
=
JsonHelper
.
DeserializeJsonToObject
<
ReelParam
>(
fix
);
return
true
;
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"解析校准库位缓存异常"
,
e
);
}
return
false
;
}
public
static
void
PutReelInFixPos
(
ReelParam
reelParam
)
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
JsonHelper
.
SerializeObject
(
reelParam
));
}
public
static
void
ClearReelInFixPos
()
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
""
);
}
#
endregion
}
public
enum
StoreType
{
...
...
LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
3aae5c3
...
...
@@ -39,7 +39,7 @@
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\增广夹爪\Rmaxis\bin\Debug
\log4net.dll</HintPath>
<HintPath>..\
DLL
\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
...
...
TheMachine/TheMachine.csproj
查看文件 @
3aae5c3
...
...
@@ -43,15 +43,15 @@
<ItemGroup>
<Reference Include="CodeLibrary, Version=1.0.8406.19246, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\CodeLibrary.dll</HintPath>
<HintPath>..\DLL\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\ConfigHelper.dll</HintPath>
<HintPath>..\DLL\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\
..\SO1069MIMO_PLUS\
DLL\log4net.dll</HintPath>
<HintPath>..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论