Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9ee96ea1
由
几米阳光
编写于
2019-05-08 09:22:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
b1c37f0f
全部展开
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
68 行增加
和
34 行删除
dll/Asa.IOModule.AIOBOX.dll
dll/Asa.IOModule.AIOBOX.xml
source/ACSingleStore/App.config
source/Common/util/LogUtil.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager - 复制.cs → source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager-back.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
dll/Asa.IOModule.AIOBOX.dll
查看文件 @
9ee96ea
此文件类型无法预览
dll/Asa.IOModule.AIOBOX.xml
查看文件 @
9ee96ea
...
@@ -33,6 +33,18 @@
...
@@ -33,6 +33,18 @@
自动读取DO事件触发
自动读取DO事件触发
</summary>
</summary>
</member>
</member>
<member
name=
"T:Asa.IOModule.AIOBOX.Log_Out"
>
<summary>
日志输出
</summary>
<param
name=
"box"
></param>
<param
name=
"s"
></param>
</member>
<member
name=
"E:Asa.IOModule.AIOBOX.Log_Out_Event"
>
<summary>
日志输出事件
</summary>
</member>
<member
name=
"M:Asa.IOModule.AIOBOX.#ctor"
>
<member
name=
"M:Asa.IOModule.AIOBOX.#ctor"
>
<summary>
<summary>
AIOBOX
AIOBOX
...
@@ -78,6 +90,11 @@
...
@@ -78,6 +90,11 @@
自动读取DO状态,触发DO_Changed_Event
自动读取DO状态,触发DO_Changed_Event
</summary>
</summary>
</member>
</member>
<member
name=
"P:Asa.IOModule.AIOBOX.LogOut"
>
<summary>
日志输出
</summary>
</member>
<member
name=
"P:Asa.IOModule.AIOBOX.Type"
>
<member
name=
"P:Asa.IOModule.AIOBOX.Type"
>
<summary>
<summary>
IO模块类型
IO模块类型
...
@@ -194,6 +211,11 @@
...
@@ -194,6 +211,11 @@
自动读取DIO线程
自动读取DIO线程
</summary>
</summary>
</member>
</member>
<member
name=
"M:Asa.IOModule.AIOBOX.LogPrint"
>
<summary>
日志输出线程
</summary>
</member>
<member
name=
"T:Asa.IOModule.Reg"
>
<member
name=
"T:Asa.IOModule.Reg"
>
<summary>
<summary>
IO模块寄存器
IO模块寄存器
...
...
source/ACSingleStore/App.config
查看文件 @
9ee96ea
...
@@ -54,10 +54,23 @@
...
@@ -54,10 +54,23 @@
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
root
>
<
appender
name
=
"AIOBOXLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/AIOBOX1.log"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t] %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
root
>
</
logger
>
<
logger
name
=
"AIOBOXLog"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"AIOBOXLog"
/>
</
logger
>
</
log4net
>
</
log4net
>
<
startup
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.6.1"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.6.1"
/>
...
...
source/Common/util/LogUtil.cs
查看文件 @
9ee96ea
...
@@ -13,8 +13,8 @@ namespace OnlineStore.Common
...
@@ -13,8 +13,8 @@ namespace OnlineStore.Common
{
{
private
static
LogUtil
instance
=
new
LogUtil
();
private
static
LogUtil
instance
=
new
LogUtil
();
public
delegate
void
ShowLog
(
string
msg
,
Color
color
);
public
delegate
void
ShowLog
(
string
msg
,
Color
color
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
"RollingLogFileAppender"
);
public
static
readonly
ILog
AIOLog
=
LogManager
.
GetLogger
(
"AIOBOXLog"
);
public
static
Dictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Dictionary
<
int
,
DateTime
>();
public
static
Dictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Dictionary
<
int
,
DateTime
>();
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
...
@@ -23,7 +23,6 @@ namespace OnlineStore.Common
...
@@ -23,7 +23,6 @@ namespace OnlineStore.Common
public
static
bool
debug_opened
=
false
;
public
static
bool
debug_opened
=
false
;
public
static
void
info
(
ILog
log
,
string
msg
)
public
static
void
info
(
ILog
log
,
string
msg
)
{
{
if
(
log
==
null
)
if
(
log
==
null
)
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
9ee96ea
...
@@ -36,8 +36,8 @@
...
@@ -36,8 +36,8 @@
<Prefer32Bit>false</Prefer32Bit>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference Include="AIOBOX">
<Reference Include="A
sa.IOModule.A
IOBOX">
<HintPath>..\..\dll\AIOBOX.dll</HintPath>
<HintPath>..\..\dll\A
sa.IOModule.A
IOBOX.dll</HintPath>
</Reference>
</Reference>
<Reference Include="CodeLibrary">
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
...
...
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager
- 复制
.cs
→
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager
-back
.cs
查看文件 @
9ee96ea
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
9ee96ea
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
9ee96ea
...
@@ -340,7 +340,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -340,7 +340,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SI_03_AxisToP1
(
LineMoveP
moveP
)
private
void
SI_03_AxisToP1
(
LineMoveP
moveP
)
{
{
InStoreLog
(
"入库:SI_03 所有轴回
到待机点,轴2、轴1 动作到P1, 轴4动作至P3,等待吸盘处于上升位置
"
);
InStoreLog
(
"入库:SI_03 所有轴回
待机点,轴2、轴1 到P1, 轴4到P3,吸盘在上升端
"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
bool
needMove
=
false
;
bool
needMove
=
false
;
if
(!
ShuoKeControls
.
IsInPosition
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
))
if
(!
ShuoKeControls
.
IsInPosition
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
))
...
@@ -368,7 +368,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -368,7 +368,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
SI_02_Move
(
LineMoveP
moveP
)
private
void
SI_02_Move
(
LineMoveP
moveP
)
{
{
InStoreLog
(
"入库:SI_02_ 进出轴
(叉子)动作
至P1"
);
InStoreLog
(
"入库:SI_02_ 进出轴至P1"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
bool
result
=
InOutBackToP1
(
moveP
.
InOut_P1
);
bool
result
=
InOutBackToP1
(
moveP
.
InOut_P1
);
if
(!
result
)
if
(!
result
)
...
@@ -418,7 +418,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -418,7 +418,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(!
StoreMove
.
IsNeedInStore
)
if
(!
StoreMove
.
IsNeedInStore
)
{
{
InStoreLog
(
"送出料盘:SI_21 ,
需要操作人员拿走料盘,
升降轴到门口位置P7 "
);
InStoreLog
(
"送出料盘:SI_21 ,升降轴到门口位置P7 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_21_DeviceToDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_21_DeviceToDoor
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_Door_P7
,
Config
.
UpDownAxis_P7_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_Door_P7
,
Config
.
UpDownAxis_P7_Speed
);
}
}
...
@@ -427,14 +427,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -427,14 +427,14 @@ namespace OnlineStore.DeviceLibrary
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
)
{
{
int
targetPosition
=
moveP
.
UpDown_P1
-
Config
.
UpDownAxis_DownValue
;
int
targetPosition
=
moveP
.
UpDown_P1
-
Config
.
UpDownAxis_DownValue
;
InStoreLog
(
"入库:SI_06 压紧轴压紧,压紧轴到P2,升降轴
稍微下降【"
+
Config
.
UpDownAxis_DownValue
+
"】,目标位置
【"
+
targetPosition
+
"】 "
);
InStoreLog
(
"入库:SI_06 压紧轴压紧,压紧轴到P2,升降轴
下降【"
+
Config
.
UpDownAxis_DownValue
+
"】目标
【"
+
targetPosition
+
"】 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_06_CompressWork
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_06_CompressWork
);
ComMoveToPosition
(
moveP
.
ComPress_P2
,
true
);
ComMoveToPosition
(
moveP
.
ComPress_P2
,
true
);
ACAxisMove
(
Config
.
UpDown_Axis
,
targetPosition
,
Config
.
UpDownAxis_P4_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
targetPosition
,
Config
.
UpDownAxis_P4_Speed
);
}
}
else
else
{
{
InStoreLog
(
"入库:SI_07 叉子返回,进出轴至P1
(待机点)
"
);
InStoreLog
(
"入库:SI_07 叉子返回,进出轴至P1 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_DeviceBackFromDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_DeviceBackFromDoor
);
InOutBackToP1
(
moveP
.
InOut_P1
);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
}
...
@@ -449,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -449,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
//}
//}
//else if (StoreMove.MoveStep == StoreMoveStep.SI_061_UpdownAxisDown)
//else if (StoreMove.MoveStep == StoreMoveStep.SI_061_UpdownAxisDown)
{
{
InStoreLog
(
"入库:SI_07 叉子返回,进出轴至P1
(待机点)
"
);
InStoreLog
(
"入库:SI_07 叉子返回,进出轴至P1 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_DeviceBackFromDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_07_DeviceBackFromDoor
);
InOutBackToP1
(
moveP
.
InOut_P1
);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
}
...
@@ -516,14 +516,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -516,14 +516,14 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_12_PutWareToBag
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_12_PutWareToBag
)
{
{
InStoreLog
(
"入库:SI_13 叉子从库位
中
返回,进出轴至P1(待机点) "
);
InStoreLog
(
"入库:SI_13 叉子从库位返回,进出轴至P1(待机点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_13_InoutBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_13_InoutBack
);
InOutBackToP1
(
moveP
.
InOut_P1
);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_13_InoutBack
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_13_InoutBack
)
{
{
InStoreLog
(
"入库:SI_14 返回待机点,轴2/轴1
/轴4动作至P3(待机点))
"
);
InStoreLog
(
"入库:SI_14 返回待机点,轴2/轴1
到P1,轴4到P3
"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_14_GoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_14_GoBack
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
...
@@ -543,7 +543,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -543,7 +543,7 @@ namespace OnlineStore.DeviceLibrary
#
region
送出料盘处理
#
region
送出料盘处理
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_21_DeviceToDoor
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_21_DeviceToDoor
)
{
{
InStoreLog
(
"送出料盘:SI_21 ,
需要操作人员拿走料盘,进出轴(叉子)
到仓门出料点P4 "
);
InStoreLog
(
"送出料盘:SI_21 ,
进出轴
到仓门出料点P4 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_22_InoutToDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_22_InoutToDoor
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P4
,
Config
.
InOutAxis_P2_Speed
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P4
,
Config
.
InOutAxis_P2_Speed
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SafetyLightCurtains
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SafetyLightCurtains
,
IO_VALUE
.
HIGH
));
...
@@ -553,7 +553,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -553,7 +553,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
InStoreLog
(
"送出料盘:SI_22 ,
需要操作人员拿走料盘,
打开仓门 "
);
InStoreLog
(
"送出料盘:SI_22 ,打开仓门 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_23_OpenDoor
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_23_OpenDoor
);
OpenDoorAndWait
();
OpenDoorAndWait
();
}
}
...
@@ -572,7 +572,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -572,7 +572,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
InStoreLog
(
"送出料盘:SI_13 叉子从库位
中返回,进出轴动作至
P1(待机点) "
);
InStoreLog
(
"送出料盘:SI_13 叉子从库位
返回,进出轴到
P1(待机点) "
);
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
lastPosId
=
""
;
lastPosId
=
""
;
...
@@ -699,7 +699,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -699,7 +699,7 @@ namespace OnlineStore.DeviceLibrary
{
{
StoreMove
.
TimeOutSeconds
=
120
;
StoreMove
.
TimeOutSeconds
=
120
;
ACAxisMove
(
Config
.
Batch_Axis
,
targetValue
,
Config
.
BatchAxis_P1_Speed
);
ACAxisMove
(
Config
.
Batch_Axis
,
targetValue
,
Config
.
BatchAxis_P1_Speed
);
OutStoreLog
(
"出库:SO_03 批量
上下料
轴下降【"
+
outDownPosition
+
"】目标【"
+
targetValue
+
"】 "
);
OutStoreLog
(
"出库:SO_03 批量轴下降【"
+
outDownPosition
+
"】目标【"
+
targetValue
+
"】 "
);
}
}
else
else
{
{
...
@@ -755,7 +755,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -755,7 +755,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
{
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
LogUtil
.
error
(
"出库【"
+
posId
+
"】
过程中叉子已从库位退出
,未检测到叉子料盘信号 "
);
LogUtil
.
error
(
"出库【"
+
posId
+
"】
取料完成后
,未检测到叉子料盘信号 "
);
}
}
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
{
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
9ee96ea
...
@@ -161,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -161,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
AutoBaitingStatus
=
StoreRunStatus
.
Reset
;
AutoBaitingStatus
=
StoreRunStatus
.
Reset
;
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R00_Start
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R00_Start
);
LogUtil
.
info
(
Name
+
"开始复位,是否
需要入库【"
+
AutomaticBaiting
.
IsNeedStartInout
+
"】,上料轴是否需要
回原点【"
+
AutomaticBaiting
.
IsNeedAxisHome
+
"】"
);
LogUtil
.
info
(
Name
+
"开始复位,是否
入库【"
+
AutomaticBaiting
.
IsNeedStartInout
+
"】,上料轴
回原点【"
+
AutomaticBaiting
.
IsNeedAxisHome
+
"】"
);
return
true
;
return
true
;
}
}
...
@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
if
(
ACServerManager
.
GetAlarmStatus
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
()).
Equals
(
1
))
if
(
ACServerManager
.
GetAlarmStatus
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
()).
Equals
(
1
))
{
{
isClearAlarm
=
true
;
isClearAlarm
=
true
;
LogUtil
.
info
(
Name
+
"复位中:批量上下料轴清理报警"
);
LogUtil
.
debug
(
Name
+
"复位中:批量上下料轴清理报警"
);
ACServerManager
.
AlarmClear
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
ACServerManager
.
AlarmClear
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
}
}
...
@@ -219,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -219,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
//if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(1))
//if (ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis).Equals(1))
{
{
LogUtil
.
info
(
Name
+
"复位中: 没有料盘,不需要上料,上料轴回
0
点"
);
LogUtil
.
info
(
Name
+
"复位中: 没有料盘,不需要上料,上料轴回
原
点"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
StoreMove
.
TimeOutSeconds
=
120
;
StoreMove
.
TimeOutSeconds
=
120
;
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
...
@@ -255,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -255,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IsNeedStartInout
)
if
(
IsNeedStartInout
)
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:
需要检测是否有料盘,批量轴匀速上升速度
【"
+
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
+
"】"
);
LogUtil
.
info
(
Name
+
"复位中:
检测是否有料盘,批量轴匀速上升
【"
+
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
}
else
else
...
@@ -355,7 +355,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -355,7 +355,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOManager
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I07_BatchAxisUp
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I07_BatchAxisUp
);
LogUtil
.
info
(
Name
+
"入料: 批量
上下料轴上升速度
【"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"】"
);
LogUtil
.
info
(
Name
+
"入料: 批量
轴匀速上升
【"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
...
@@ -413,7 +413,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -413,7 +413,7 @@ namespace OnlineStore.DeviceLibrary
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I08_GetPosId
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I08_GetPosId
);
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastWidth
+
"*"
+
LastHeight
+
"】二维码【"
+
LastCode
+
"】"
);
LogUtil
.
debug
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastWidth
+
"*"
+
LastHeight
+
"】二维码【"
+
LastCode
+
"】"
);
GetInStorePosId
(
ProcessMsg
());
GetInStorePosId
(
ProcessMsg
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
...
@@ -434,12 +434,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -434,12 +434,12 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
)
||
(!
LastPosId
.
Equals
(
""
)))
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
)
||
(!
LastPosId
.
Equals
(
""
)))
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I09_WaitTrayLeave
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I09_WaitTrayLeave
);
LogUtil
.
info
(
Name
+
"入料: 开始入
料
【"
+
LastPosId
+
"】,等待料盘拿走"
);
LogUtil
.
info
(
Name
+
"入料: 开始入
库
【"
+
LastPosId
+
"】,等待料盘拿走"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
LOW
));
}
}
else
else
{
{
LogUtil
.
info
(
Name
+
"入料:
未获取到PosID或启动
入库失败,尺寸:【"
+
LastWidth
+
"*"
+
LastHeight
+
"】将料盘送出,等待料盘拿走"
);
LogUtil
.
info
(
Name
+
"入料: 入库失败,尺寸:【"
+
LastWidth
+
"*"
+
LastHeight
+
"】将料盘送出,等待料盘拿走"
);
SendTrayOut
();
SendTrayOut
();
}
}
}
}
...
@@ -487,7 +487,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -487,7 +487,7 @@ namespace OnlineStore.DeviceLibrary
addHeight
=
StoreManager
.
Config
.
LastTrayAddHeight
;
addHeight
=
StoreManager
.
Config
.
LastTrayAddHeight
;
}
}
LastHeight
+=
addHeight
;
LastHeight
+=
addHeight
;
LogUtil
.
info
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后高度【"
+
LastHeight
+
"】"
);
LogUtil
.
debug
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后高度【"
+
LastHeight
+
"】"
);
if
(
LastHeight
<
0
)
if
(
LastHeight
<
0
)
{
{
LastHeight
=
StoreManager
.
Config
.
GetDefaultHeight
();
LastHeight
=
StoreManager
.
Config
.
GetDefaultHeight
();
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
9ee96ea
...
@@ -284,7 +284,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -284,7 +284,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
info
(
"扫到二维码:"
+
LastCode
);
LogUtil
.
debug
(
"扫到二维码:"
+
LastCode
);
}
}
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
// StoreManager.Store.onCodeReceived(message);
// StoreManager.Store.onCodeReceived(message);
...
@@ -368,14 +368,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -368,14 +368,14 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
if
(
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
{
LogUtil
.
info
(
Name
+
"
收到二维码
【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
LogUtil
.
info
(
Name
+
"【 "
+
message
+
"】,设备未启动,不需要发送服务器"
);
return
;
return
;
}
}
//开启服务器日志
//开启服务器日志
//HttpHelper.isLog = 1;
//HttpHelper.isLog = 1;
LogUtil
.
info
(
Name
+
"
收到二维码
【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
LogUtil
.
info
(
Name
+
"【 "
+
message
+
"】,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
//发送扫码内容到服务器进行入库操作
Operation
operation
=
StoreManager
.
Store
.
getLineBoxStatus
();
Operation
operation
=
StoreManager
.
Store
.
getLineBoxStatus
();
operation
.
op
=
1
;
operation
.
op
=
1
;
...
@@ -386,7 +386,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -386,7 +386,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
Store
.
autoNext
&&
(!
String
.
IsNullOrEmpty
(
autoposId
)))
if
(
StoreManager
.
Store
.
autoNext
&&
(!
String
.
IsNullOrEmpty
(
autoposId
)))
{
{
operation
.
data
.
Add
(
ParamDefine
.
inPos
,
autoposId
);
operation
.
data
.
Add
(
ParamDefine
.
inPos
,
autoposId
);
LogUtil
.
info
(
"添加自动入库库位号:"
+
autoposId
);
LogUtil
.
debug
(
"添加自动入库库位号:"
+
autoposId
);
}
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
Operation
resultOperation
=
HttpHelper
.
Post
(
StoreManager
.
GetPostApi
(
server
),
operation
,
false
);
...
@@ -428,7 +428,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -428,7 +428,7 @@ namespace OnlineStore.DeviceLibrary
if
(
position
==
null
)
if
(
position
==
null
)
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
InStoreNoPosition
,
"入库未找到库位:"
)
+
"【"
+
message
+
"】【"
+
posId
+
"】 "
;
WarnMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
InStoreNoPosition
,
"入库未找到库位:"
)
+
"【"
+
message
+
"】【"
+
posId
+
"】 "
;
LogUtil
.
error
(
"
收到服务器入库命令:
入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
LogUtil
.
error
(
"
服务器反馈
入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
return
;
}
}
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论