Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f2c3c057
由
ke.sun
编写于
2018-05-21 13:28:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加扫码枪代码
1 个父辈
1b0ee111
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
52 行增加
和
27 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/Common/util/ScanSocket.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
f2c3c05
...
...
@@ -1561,8 +1561,8 @@
this
.
menuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
料仓操作
ToolStripMenuItem
,
this
.
iO
状态查看
ToolStripMenuItem
,
this
.
配置信息
ToolStripMenuItem
,
this
.
设备调试
ToolStripMenuItem
,
this
.
配置信息
ToolStripMenuItem
,
this
.
日志
ToolStripMenuItem
});
this
.
menuStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
menuStrip1
.
Name
=
"menuStrip1"
;
...
...
@@ -1684,14 +1684,14 @@
// 轴卡点动ToolStripMenuItem
//
this
.
轴卡点动
ToolStripMenuItem
.
Name
=
"轴卡点动ToolStripMenuItem"
;
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
24
,
22
);
this
.
轴卡点动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
轴卡点动
ToolStripMenuItem
.
Text
=
"轴卡点动"
;
this
.
轴卡点动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
轴卡点动
ToolStripMenuItem_Click
);
//
// 扫码测试ToolStripMenuItem
//
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
24
,
22
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
22
);
this
.
扫码测试
ToolStripMenuItem
.
Text
=
"扫码测试"
;
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
//
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
f2c3c05
...
...
@@ -874,6 +874,11 @@ namespace OnlineStore.ACSingleStore
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
store
.
scanSocket
.
isScannerRun
)
{
store
.
scanSocket
.
ConnectScanner
(
store
.
Config
.
Scanner_Ip
,
store
.
Config
.
Scanner_Port
);
}
store
.
scanSocket
.
BeginScannering
();
}
private
void
打开舱门
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
...
source/Common/util/ScanSocket.cs
查看文件 @
f2c3c05
...
...
@@ -23,7 +23,7 @@ namespace OnlineStore.Common
/// <summary>
/// 扫描枪 是否开始运行
/// </summary>
p
rotected
bool
isScannerRun
=
false
;
p
ublic
bool
isScannerRun
=
false
;
/// <summary>
/// 连接扫码枪
/// </summary>
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
f2c3c05
...
...
@@ -28,6 +28,8 @@ AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM4,0,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,
PRO,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,
PRO,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,700000,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,705000,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,705000,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
f2c3c05
...
...
@@ -38,7 +38,7 @@ namespace OnlineStore.DeviceLibrary
/// 是否有压紧轴
/// </summary>
public
bool
IsHasCompress_Axis
=
true
;
public
ScanSocket
scanSocket
=
new
ScanSocket
();
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
public
AC_SA_BoxBean
(
AC_SA_Config
config
)
{
...
...
@@ -76,6 +76,7 @@ namespace OnlineStore.DeviceLibrary
//初始化 //连接设备
KNDManager
.
ConnectionKND
(
Config
.
DIODeviceNameList
);
scanSocket
.
OnScanRevice
+=
onCodeReceived
;
timersTimer
.
Enabled
=
false
;
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
...
...
@@ -248,6 +249,7 @@ namespace OnlineStore.DeviceLibrary
//启动温湿度服务器
//HumitureServer.StartTemperateServer(Config.TemperateServer_Port);
scanSocket
.
ConnectScanner
(
Config
.
Scanner_Ip
,
Config
.
Scanner_Port
);
ReturnHome
();
StartTime
=
DateTime
.
Now
;
timersTimer
.
Enabled
=
true
;
...
...
@@ -269,6 +271,7 @@ namespace OnlineStore.DeviceLibrary
}
}
#
region
原点返回和复位处理
private
void
ReturnHome
()
{
...
...
@@ -685,6 +688,7 @@ namespace OnlineStore.DeviceLibrary
{
ShuoKeControls
.
ClosePort
();
}
scanSocket
.
StopScanner
();
//HumitureServer.StopTemperateServer();
LogUtil
.
info
(
LOGGER
,
StoreName
+
",停止运行,总运行时间:"
+
span
.
ToString
());
...
...
@@ -939,14 +943,19 @@ namespace OnlineStore.DeviceLibrary
BusyMoveProcess
();
}
else
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
{
//判断是否需要出入库
{
if
(
scanSocket
.
isScannerRun
.
Equals
(
false
))
{
scanSocket
.
ConnectScanner
(
Config
.
Scanner_Ip
,
Config
.
Scanner_Port
);
}
//判断是否需要出入库
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
{
IO_VALUE
checkIO
=
KNDIOValue
(
IO_Type
.
TrayCheck_Door
);
//IO_VALUE checkIO2 = KNDIOValue(IO_Type.TrayCheck_2);
//判断料门口是否有料
if
((
checkIO
.
Equals
(
IO_VALUE
.
HIGH
))
)
//if ((checkIO.Equals(IO_VALUE.HIGH)) && checkIO2.Equals(IO_VALUE.HIGH))
if
((
checkIO
.
Equals
(
IO_VALUE
.
HIGH
)))
{
if
(
IsScanCode
)
{
...
...
@@ -988,7 +997,7 @@ namespace OnlineStore.DeviceLibrary
private
void
BeginScannering
()
{
scanSocket
.
BeginScannering
();
}
private
DateTime
preIoTimerOutTime
=
DateTime
.
Now
;
...
...
@@ -1215,11 +1224,11 @@ namespace OnlineStore.DeviceLibrary
IsNotScanCode
=
false
;
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
暂未开启
,不需要发送服务器"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"
收到二维码【 "
+
message
+
"】,设备未启动
,不需要发送服务器"
);
IsScanCode
=
false
;
return
;
}
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码
<< "
+
message
+
"
,发送给服务器获取入库PosID"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"收到二维码
【 "
+
message
+
"】
,发送给服务器获取入库PosID"
);
//发送扫码内容到服务器进行入库操作
Operation
operation
=
getLineBoxStatus
();
operation
.
op
=
1
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
f2c3c05
...
...
@@ -160,21 +160,20 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
wait
.
WaitType
==
2
)
{
//if (!KNDIOValue(wait.IoType).Equals(wait.IoValue))
//{
// //一分钟还未检测到
// if (span.TotalMilliseconds > Config.IOSingle_TimerOut)
// {
// ConfigIO io = Config.getWaitIO(wait.IoType);
// WarnMsg = StoreName + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
// //SendAlarmCode(StoreID, LineAlarm.IoNotOk, wait.IoType);
// Alarm(StoreAlarmType.IoSingleTimeOut, io.ElectricalDefinition, WarnMsg, StoreMove.MoveType);
// LogUtil.error(LOGGER, StoreName + wait.IoType + "等待信号(" + io.DisplayStr + "=" + wait.IoValue + ") 超时", 14);
// }
// isOk = false;
// break;
//}
if
(!
KNDIOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
))
{
//一分钟还未检测到
if
(
span
.
TotalMilliseconds
>
Config
.
IOSingle_TimerOut
)
{
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
StoreName
+
" 等待信号"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时!"
;
//SendAlarmCode(StoreID, LineAlarm.IoNotOk, wait.IoType);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
}
isOk
=
false
;
break
;
}
}
else
if
(
wait
.
WaitType
==
3
)
{
...
...
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
查看文件 @
f2c3c05
...
...
@@ -49,6 +49,16 @@ namespace OnlineStore.LoadCSVLibrary
public
int
IsHasCompress_Axis
{
get
;
set
;
}
/// <summary>
/// PRO 扫码枪IP Scanner_Ip 192.168.200.13
/// </summary>
[
ConfigProAttribute
(
"Scanner_Ip"
)]
public
string
Scanner_Ip
{
get
;
set
;
}
/// <summary>
/// PRO 扫码枪端口号 Scanner_Port 51236
/// </summary>
[
ConfigProAttribute
(
"Scanner_Port"
)]
public
int
Scanner_Port
{
get
;
set
;
}
/// <summary>
/// PRO (轴一)旋转轴原点目标速度 MiddleAxis_TargetSpeed 30000
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_TargetSpeed"
)]
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论