Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8c49230a
由
几米阳光
编写于
2018-12-12 17:23:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
叉子下降时就通知服务器入仓位完成。
1 个父辈
e1da6358
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
15 行删除
source/ACSingleStore/FrmAxisDebug.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/ACSingleStore/FrmAxisDebug.cs
查看文件 @
8c49230
...
...
@@ -45,10 +45,10 @@ namespace OnlineStore.ACSingleStore
}
private
void
FrmAxisDebug_Load
(
object
sender
,
EventArgs
e
)
{
txtMiddleSpeed
.
Text
=
middle
.
TargetSpeed
.
ToString
();
txtInOutSpeed
.
Text
=
inout
.
TargetSpeed
.
ToString
();
txtUpDownSpeed
.
Text
=
updown
.
TargetSpeed
.
ToString
();
txtComSpeed
.
Text
=
ACStoreManager
.
store
.
Config
.
CompressAxis_EndSpeed
.
ToString
();
txtMiddleSpeed
.
Text
=
(
middle
.
TargetSpeed
/
5
)
.
ToString
();
txtInOutSpeed
.
Text
=
(
inout
.
TargetSpeed
/
5
)
.
ToString
();
txtUpDownSpeed
.
Text
=
(
updown
.
TargetSpeed
/
5
)
.
ToString
();
txtComSpeed
.
Text
=
(
ACStoreManager
.
store
.
Config
.
CompressAxis_EndSpeed
/
5
)
.
ToString
();
timer1
.
Start
();
}
/// <summary>
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
8c49230
...
...
@@ -147,7 +147,7 @@ namespace OnlineStore.ACSingleStore
}
private
bool
LoadOk
=
false
;
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
{
LogUtil
.
logBox
=
this
.
richTextBox1
;
initValue
();
this
.
ShowInTaskbar
=
true
;
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
8c49230
...
...
@@ -150,6 +150,7 @@ namespace OnlineStore.DeviceLibrary
//把数字转换为四位的字符串
public
static
string
SpeedToStr
(
int
speed
,
int
length
)
{
speed
=
Math
.
Abs
(
speed
);
string
str
=
String
.
Format
(
"{0:X}"
,
speed
);
return
str
.
PadLeft
(
length
,
'0'
);
}
...
...
@@ -322,8 +323,13 @@ namespace OnlineStore.DeviceLibrary
int
preSpeed
=
GetAddrValue
(
portName
,
ACCMDManager
.
Speed_Addr
);
if
((
preSpeed
.
Equals
(-
1
))
||
(!
preSpeed
.
Equals
(
Math
.
Abs
(
speed
))))
{
byte
[]
data
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_WriteRegisters
,
"4601"
,
string
.
Format
(
"{0:X2}"
,
Math
.
Abs
(
speed
)),
2
);
SendData
(
portName
,
data
);
//byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, "4601", string.Format("{0:X2}", Math.Abs(speed)), 2);
//SendData(portName, data);
//UpdateAddrValue(portName, ACCMDManager.Speed_Addr, Math.Abs(speed));
//Thread.Sleep(SleepMSendons);
string
v1
=
slvAddr
+
"064601 "
+
ACServerManager
.
SpeedToStr
(
speed
,
4
)
+
" ffff"
;
LogUtil
.
debug
(
"轴【"
+
portName
+
"】更新速度为【"
+
speed
+
"】,发送数据【"
+
v1
+
"】"
);
SendStrAndSleep
(
portName
,
v1
,
SleepMSendons
);
UpdateAddrValue
(
portName
,
ACCMDManager
.
Speed_Addr
,
Math
.
Abs
(
speed
));
Thread
.
Sleep
(
SleepMSendons
);
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
8c49230
...
...
@@ -453,6 +453,14 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_11_DeviceToBag
)
{
InStoreLog
(
"入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点),压紧轴至P3(压紧前点) "
);
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
//if (IsHasCompress_Axis)
...
...
@@ -465,14 +473,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_12_PutWareToBag
)
{
InStoreLog
(
"入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "
);
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
lastPosId
=
posId
;
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_13_DeviceBackFromBag
);
InOutBackToP1
(
moveP
.
InOut_P1
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论