Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1053_DualSISO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 10fea4c6
由
刘韬
编写于
2022-12-18 11:50:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
ad0410c7
隐藏空白字符变更
内嵌
并排
正在显示
40 个修改的文件
包含
629 行增加
和
457 行删除
Common/Setting_Init.cs
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/RemoteClient.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/packages.config
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/Common.cs
DeviceLibrary/theMachine/IRobot.cs
DeviceLibrary/theMachine/JobList.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
DeviceLibrary/theMachine/MoveInfo.cs
DeviceLibrary/theMachine/MoveStep.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/theMachine/Store/StoreMachine.cs
DeviceLibrary/theMachine/Store/StoreMachine_AutoInOutTest.cs
DeviceLibrary/theMachine/Store/StoreMachine_Common.cs
DeviceLibrary/theMachine/Store/StoreMachine_Store.cs
LoadCVSLibrary/Config/Config - 复制(2).csv
LoadCVSLibrary/Config/Config_Left1.csv
LoadCVSLibrary/Config/Left/Config.csv
LoadCVSLibrary/Config/Right/Config.csv
LoadCVSLibrary/LoadCSVLibrary.csproj
LoadCVSLibrary/storeConfig/config/Store_ConfigBase.cs
TheMachine/App.config
TheMachine/Common.cs
TheMachine/Form1.Designer.cs
TheMachine/Form1.cs
TheMachine/Form1.resx
TheMachine/Properties/AssemblyInfo.cs
TheMachine/SBDH.ico
TheMachine/SettingControl.cs
TheMachine/TheMachine.csproj
TheMachine/UC/UC_LedConfig.Designer.cs
TheMachine/UC/UC_LedConfig.cs
TheMachine/UC/uc_boxdebug.cs
TheMachine/UCStoreMachine.Designer.cs
TheMachine/UCStoreMachine.cs
TheMachine/positionTool/FrmPositionTool.cs
Common/Setting_Init.cs
查看文件 @
10fea4c
...
@@ -51,6 +51,10 @@ namespace OnlineStore.Common
...
@@ -51,6 +51,10 @@ namespace OnlineStore.Common
public
static
MyConfig
<
bool
>
Device_Allow_SingleIn
=
false
;
public
static
MyConfig
<
bool
>
Device_Allow_SingleIn
=
false
;
[
MyConfigComment
(
"设备运行时允许手动控制伺服"
)]
[
MyConfigComment
(
"设备运行时允许手动控制伺服"
)]
public
static
MyConfig
<
bool
>
Device_Axis_Manual_Control_AtRunning
=
false
;
public
static
MyConfig
<
bool
>
Device_Axis_Manual_Control_AtRunning
=
false
;
[
MyConfigComment
(
"MT WebSocket服务器地址"
)]
public
static
MyConfig
<
string
>
Device_MT_Server
=
"ws://127.0.0.1:26901/"
;
/// <summary>
/// <summary>
/// 摄像机名称
/// 摄像机名称
/// </summary>
/// </summary>
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
10fea4c
...
@@ -59,9 +59,39 @@
...
@@ -59,9 +59,39 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<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>
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</Reference>
<Reference Include="RemoteSheardObject">
<HintPath>..\..\1053_CycleLine\RemoteSheardObject\bin\Debug\RemoteSheardObject.dll</HintPath>
</Reference>
<Reference Include="SuperSocket.ClientEngine, Version=0.10.0.0, Culture=neutral, PublicKeyToken=ee9af13f57f00acc, processorArchitecture=MSIL">
<HintPath>..\packages\SuperSocket.ClientEngine.Core.0.10.0\lib\net45\SuperSocket.ClientEngine.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System" />
<Reference Include="System.Collections.Specialized, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Specialized.4.3.0\lib\net46\System.Collections.Specialized.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.NameResolution, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.NameResolution.4.3.0\lib\net46\System.Net.NameResolution.dll</HintPath>
</Reference>
<Reference Include="System.Net.Security, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Security.4.3.0\lib\net46\System.Net.Security.dll</HintPath>
</Reference>
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
</Reference>
...
@@ -73,6 +103,9 @@
...
@@ -73,6 +103,9 @@
<Reference Include="System.Data" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml" />
<Reference Include="WebSocket4Net, Version=0.15.2.11, Culture=neutral, PublicKeyToken=eb4e154b696bf72a, processorArchitecture=MSIL">
<HintPath>..\packages\WebSocket4Net.0.15.2\lib\net45\WebSocket4Net.dll</HintPath>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="DeviceLibrary\AcSerialBean.cs" />
<Compile Include="DeviceLibrary\AcSerialBean.cs" />
...
...
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
10fea4c
...
@@ -201,7 +201,7 @@ namespace DeviceLibrary
...
@@ -201,7 +201,7 @@ namespace DeviceLibrary
AxisManager
.
SuddenStop
(
axis
.
DeviceName
,
axis
.
GetAxisValue
());
AxisManager
.
SuddenStop
(
axis
.
DeviceName
,
axis
.
GetAxisValue
());
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
}
}
LogUtil
.
error
(
$
"{ MoveInfo.Name} {MoveInfo.MoveStep} {axis.DisplayStr}目标位置{targetPosition}当前位置{outCount},误差过大,{clearMsg}重新开始运动,剩余{MoveInfo.CanWhileCount}次"
);
MoveInfo
.
error
(
$
"{ MoveInfo.Name} {MoveInfo.MoveStep} {axis.DisplayStr}目标位置{targetPosition}当前位置{outCount},误差过大,{clearMsg}重新开始运动,剩余{MoveInfo.CanWhileCount}次"
);
var
AddSpeed
=
axis
.
AddSpeed
>
0
?
axis
.
AddSpeed
:
targetSpeed
*
4
;
var
AddSpeed
=
axis
.
AddSpeed
>
0
?
axis
.
AddSpeed
:
targetSpeed
*
4
;
var
DelSpeed
=
axis
.
DelSpeed
>
0
?
axis
.
DelSpeed
:
targetSpeed
*
4
;
var
DelSpeed
=
axis
.
DelSpeed
>
0
?
axis
.
DelSpeed
:
targetSpeed
*
4
;
AxisManager
.
AbsMove
(
axis
.
DeviceName
,
axis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
AddSpeed
,
DelSpeed
);
// , axis.AddSpeed, axis.DelSpeed);
AxisManager
.
AbsMove
(
axis
.
DeviceName
,
axis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
AddSpeed
,
DelSpeed
);
// , axis.AddSpeed, axis.DelSpeed);
...
@@ -211,7 +211,7 @@ namespace DeviceLibrary
...
@@ -211,7 +211,7 @@ namespace DeviceLibrary
else
else
{
{
msg
=
$
"{MoveInfo.Name} {MoveInfo.MoveStep} {axis.DisplayStr},目标位置{targetPosition},当前位置{outCount},误差过大,需要报警"
;
msg
=
$
"{MoveInfo.Name} {MoveInfo.MoveStep} {axis.DisplayStr},目标位置{targetPosition},当前位置{outCount},误差过大,需要报警"
;
LogUtil
.
error
(
msg
,
600
);
MoveInfo
.
error
(
msg
);
}
}
}
}
return
false
;
return
false
;
...
@@ -231,7 +231,7 @@ namespace DeviceLibrary
...
@@ -231,7 +231,7 @@ namespace DeviceLibrary
//判断是否需要重新运动
//判断是否需要重新运动
if
(
MoveInfo
.
CanWhileCount
>
0
)
if
(
MoveInfo
.
CanWhileCount
>
0
)
{
{
LogUtil
.
error
(
MoveInfo
.
Name
+
axis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
MoveInfo
.
CanWhileCount
+
"]次"
);
MoveInfo
.
error
(
MoveInfo
.
Name
+
axis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
MoveInfo
.
CanWhileCount
+
"]次"
);
//LogUtil.error( StoreName + moveAxis.DisplayStr + "重新回原点");
//LogUtil.error( StoreName + moveAxis.DisplayStr + "重新回原点");
AxisManager
.
HomeMove
(
axis
.
DeviceName
,
axis
.
GetAxisValue
(),
axis
.
HomeHighSpeed
,
axis
.
HomeLowSpeed
,
axis
.
HomeAddSpeed
);
AxisManager
.
HomeMove
(
axis
.
DeviceName
,
axis
.
GetAxisValue
(),
axis
.
HomeHighSpeed
,
axis
.
HomeLowSpeed
,
axis
.
HomeAddSpeed
);
MoveInfo
.
CanWhileCount
--;
MoveInfo
.
CanWhileCount
--;
...
@@ -239,7 +239,7 @@ namespace DeviceLibrary
...
@@ -239,7 +239,7 @@ namespace DeviceLibrary
else
else
{
{
msg
=
MoveInfo
.
Name
+
" "
+
MoveInfo
.
MoveStep
+
axis
.
DisplayStr
+
",收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
msg
=
MoveInfo
.
Name
+
" "
+
MoveInfo
.
MoveStep
+
axis
.
DisplayStr
+
",收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
);
MoveInfo
.
error
(
msg
);
}
}
}
}
return
false
;
return
false
;
...
...
DeviceLibrary/DeviceLibrary/RemoteClient.cs
0 → 100644
查看文件 @
10fea4c
using
Newtonsoft.Json
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Timers
;
namespace
DeviceLibrary
{
public
class
RemoteClient1
{
string
GroupName
;
IRobot
Robot
;
WebSocket4Net
.
WebSocket
webSocket
;
System
.
Timers
.
Timer
timer
;
public
RemoteClient
(
IRobot
robot
,
string
groupName
)
{
Robot
=
robot
;
GroupName
=
groupName
;
timer
=
new
System
.
Timers
.
Timer
(
2000
);
timer
.
Enabled
=
false
;
timer
.
AutoReset
=
true
;
timer
.
Elapsed
+=
Timer_Elapsed
;
webSocket
=
new
WebSocket4Net
.
WebSocket
(
Setting_Init
.
Device_MT_Server
+
GroupName
);
LogUtil
.
info
(
"webSocket:"
+
Setting_Init
.
Device_MT_Server
+
GroupName
);
webSocket
.
MessageReceived
+=
WebSocket_MessageReceived
;
webSocket
.
Closed
+=
WebSocket_Closed
;
webSocket
.
Opened
+=
WebSocket_Opened
;
webSocket
.
AutoSendPingInterval
=
2
;
webSocket
.
EnableAutoSendPing
=
true
;
}
private
void
WebSocket_Opened
(
object
sender
,
EventArgs
e
)
{
LogUtil
.
info
(
$
"Remote:{GroupName} 连接成功"
);
LastState
=
webSocket
.
State
;
}
private
void
WebSocket_Closed
(
object
sender
,
EventArgs
e
)
{
if
(
LastState
!=
webSocket
.
State
)
{
LogUtil
.
info
(
$
"Remote:{GroupName} 掉线了"
);
}
LastState
=
webSocket
.
State
;
}
WebSocket4Net
.
WebSocketState
LastState
=
WebSocket4Net
.
WebSocketState
.
None
;
public
bool
IsOnline
{
get
=>
webSocket
.
State
==
WebSocket4Net
.
WebSocketState
.
Open
;
}
private
void
Timer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
{
if
(
webSocket
.
State
==
WebSocket4Net
.
WebSocketState
.
Closed
)
{
try
{
webSocket
.
Open
();
}
catch
{
}
}
}
public
void
Init
()
{
LogUtil
.
info
(
"webSocket open"
);
webSocket
.
Open
();
timer
.
Start
();
}
RemoteResult
lastresult
=
RemoteResult
.
None
;
private
void
WebSocket_MessageReceived
(
object
sender
,
WebSocket4Net
.
MessageReceivedEventArgs
e
)
{
bool
isok
=
false
;
RemoteLoad
remoteLoad
;
try
{
remoteLoad
=
JsonConvert
.
DeserializeObject
<
RemoteLoad
>(
e
.
Message
);
}
catch
{
LogUtil
.
info
(
"Cant Deserialize remote command:"
+
e
.
Message
);
return
;
}
switch
(
remoteLoad
.
Action
)
{
case
"DoorRelease"
:
isok
=
Robot
.
DoorRelease
(
remoteLoad
.
RequestLoadInfo
);
break
;
case
"DoorLock"
:
isok
=
Robot
.
DoorLock
(
remoteLoad
.
RequestLoadInfo
);
break
;
case
"OK"
:
case
"FAIL"
:
lastresult
=
remoteLoad
.
Action
==
"OK"
?
RemoteResult
.
True
:
RemoteResult
.
False
;
LogUtil
.
info
(
"Revice Command Callback"
+
remoteLoad
.
GroupName
+
"-"
+
remoteLoad
.
Action
);
return
;
default
:
LogUtil
.
info
(
"unknow remote command:"
+
remoteLoad
.
Action
);
break
;
}
SendResult
(
isok
);
}
RemoteResult
WaitResult
()
{
int
w
=
3000
;
while
(
lastresult
==
RemoteResult
.
None
&&
w
>
0
)
{
Thread
.
Sleep
(
50
);
w
=
w
-
50
;
}
if
(
lastresult
==
RemoteResult
.
None
)
{
LogUtil
.
info
(
"等待远程反馈超时"
);
lastresult
=
RemoteResult
.
Timeout
;
}
return
lastresult
;
}
/// <summary>
/// 发送物料已放好
/// </summary>
/// <param name="reelParam"></param>
public
void
SendLoadPutted
(
ReelParam
reelParam
)
{
LogUtil
.
info
(
"SendTrayRelease:"
+
reelParam
.
ToStr
());
RemoteLoad
remoteLoad
=
new
RemoteLoad
();
remoteLoad
.
Action
=
"TrayRelease"
;
remoteLoad
.
GroupName
=
GroupName
;
remoteLoad
.
RequestLoadInfo
=
new
RequestLoadInfo
();
remoteLoad
.
RequestLoadInfo
.
LoadParam
=
reelParam
;
remoteLoad
.
RequestLoadInfo
.
DeviceGroupName
=
"AMH-SBDH2-1"
;
remoteLoad
.
RequestLoadInfo
.
IsEmpty
=
false
;
webSocket
.
Send
(
JsonConvert
.
SerializeObject
(
remoteLoad
));
}
/// <summary>
/// 发送舱门状态
/// </summary>
//public void SendDoorStatus(DoorStatusE doorStatus)
//{
// LogUtil.info("SendDoorStatus");
// RemoteLoad remoteLoad = new RemoteLoad();
// remoteLoad.Action = "DoorStatus";
// remoteLoad.GroupName = GroupName;
// remoteLoad.RequestLoadInfo = new RequestLoadInfo();
// remoteLoad.RequestLoadInfo.DoorStatus = doorStatus;
// webSocket.Send(JsonConvert.SerializeObject(remoteLoad));
//}
/// <summary>
/// 发送物料已取走
/// </summary>
public
void
SendTrayRelease
()
{
LogUtil
.
info
(
"SendTrayRelease"
);
RemoteLoad
remoteLoad
=
new
RemoteLoad
();
remoteLoad
.
Action
=
"TrayRelease"
;
remoteLoad
.
GroupName
=
GroupName
;
remoteLoad
.
RequestLoadInfo
=
new
RequestLoadInfo
();
remoteLoad
.
RequestLoadInfo
.
DeviceGroupName
=
GroupName
;
remoteLoad
.
RequestLoadInfo
.
IsEmpty
=
true
;
webSocket
.
Send
(
JsonConvert
.
SerializeObject
(
remoteLoad
));
}
public
void
SendResult
(
bool
result
)
{
RemoteLoad
remoteLoad
=
new
RemoteLoad
();
remoteLoad
.
Action
=
result
?
"OK"
:
"FAIL"
;
remoteLoad
.
GroupName
=
GroupName
;
webSocket
.
Send
(
JsonConvert
.
SerializeObject
(
remoteLoad
));
}
}
}
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
10fea4c
...
@@ -40,7 +40,7 @@ namespace DeviceLibrary
...
@@ -40,7 +40,7 @@ namespace DeviceLibrary
object
serverclock
=
new
object
();
object
serverclock
=
new
object
();
public
ServerCommunication
(
StoreMachine
machine
)
{
public
ServerCommunication
(
StoreMachine
machine
)
{
Machine
=
machine
;
Machine
=
machine
;
CID
=
ConfigHelper
.
Config
.
Get
(
$
"Device_{Machine.MachineSide}_CID"
,
"
0
1"
);
CID
=
ConfigHelper
.
Config
.
Get
(
$
"Device_{Machine.MachineSide}_CID"
,
"
AMH-SBDH2-
1"
);
serverConnectTimer
.
Interval
=
1000
;
serverConnectTimer
.
Interval
=
1000
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
Enabled
=
true
;
serverConnectTimer
.
Enabled
=
true
;
...
@@ -56,7 +56,8 @@ namespace DeviceLibrary
...
@@ -56,7 +56,8 @@ namespace DeviceLibrary
{
{
if
(
Machine
.
runStatus
!=
RunStatus
.
Stop
)
if
(
Machine
.
runStatus
!=
RunStatus
.
Stop
)
ProcessMsg
(
Machine
.
Msg
.
msg
);
ProcessMsg
(
Machine
.
Msg
.
msg
);
SendLineStatus
();
if
(!
string
.
IsNullOrEmpty
(
server
))
SendLineStatus
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -67,6 +68,8 @@ namespace DeviceLibrary
...
@@ -67,6 +68,8 @@ namespace DeviceLibrary
}
}
}
}
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
{
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
{
if
(
msg
==
null
)
return
;
WarnMsg
=
string
.
Join
(
","
,
msg
.
Select
(
x
=>
WarnMsg
=
string
.
Join
(
","
,
msg
.
Select
(
x
=>
{
{
if
(
x
.
msgLevel
==
MsgLevel
.
warning
||
x
.
msgLevel
==
MsgLevel
.
alarm
)
if
(
x
.
msgLevel
==
MsgLevel
.
warning
||
x
.
msgLevel
==
MsgLevel
.
alarm
)
...
@@ -88,15 +91,6 @@ namespace DeviceLibrary
...
@@ -88,15 +91,6 @@ namespace DeviceLibrary
operation
.
op
=
1
;
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
code
},
{
"boxId"
,
StoreID
.
ToString
()
},
{
"doorReelSignal"
,
"1"
}
};
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
code
},
{
"boxId"
,
StoreID
.
ToString
()
},
{
"doorReelSignal"
,
"1"
}
};
if
(
reel
.
PlateH
==
100
&&
Setting_Init
.
Device_SingleInSingleOut
)
{
//singleIn 单盘入库
operation
.
data
.
Add
(
"singleIn"
,
"true"
);
}
else
{
operation
.
data
.
Add
(
"singleIn"
,
"false"
);
}
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
15000
,
printlog
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
15000
,
printlog
);
if
(
resultOperation
==
null
||
operation
.
seq
!=
resultOperation
.
seq
)
if
(
resultOperation
==
null
||
operation
.
seq
!=
resultOperation
.
seq
)
{
{
...
@@ -120,7 +114,7 @@ namespace DeviceLibrary
...
@@ -120,7 +114,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
if
(
Machine
.
AutoInOutTestMode
)
if
(
Machine
.
AutoInOutTestMode
)
return
true
;
return
true
;
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
15000
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
15000
,
true
);
if
(
resultOperation
==
null
)
if
(
resultOperation
==
null
)
{
{
...
@@ -436,6 +430,7 @@ namespace DeviceLibrary
...
@@ -436,6 +430,7 @@ namespace DeviceLibrary
string
plateWStr
=
data
[
ParamDefine
.
plateW
];
string
plateWStr
=
data
[
ParamDefine
.
plateW
];
string
plateHStr
=
data
[
ParamDefine
.
plateH
];
string
plateHStr
=
data
[
ParamDefine
.
plateH
];
string
singleOut
=
data
[
ParamDefine
.
singleOut
];
string
singleOut
=
data
[
ParamDefine
.
singleOut
];
string
barcode
=
data
[
ParamDefine
.
barcode
];
LogUtil
.
info
(
"收到服务器出库消息:poaIs="
+
posIdStr
+
",platew="
+
plateWStr
+
",plateh="
+
plateHStr
+
",singleOut="
+
singleOut
);
LogUtil
.
info
(
"收到服务器出库消息:poaIs="
+
posIdStr
+
",platew="
+
plateWStr
+
",plateh="
+
plateHStr
+
",singleOut="
+
singleOut
);
char
splitChar
=
'|'
;
char
splitChar
=
'|'
;
...
@@ -443,12 +438,14 @@ namespace DeviceLibrary
...
@@ -443,12 +438,14 @@ namespace DeviceLibrary
string
[]
plateWArray
=
plateWStr
.
Split
(
splitChar
);
string
[]
plateWArray
=
plateWStr
.
Split
(
splitChar
);
string
[]
plateHArray
=
plateHStr
.
Split
(
splitChar
);
string
[]
plateHArray
=
plateHStr
.
Split
(
splitChar
);
string
[]
singleOutArray
=
singleOut
.
Split
(
splitChar
);
string
[]
singleOutArray
=
singleOut
.
Split
(
splitChar
);
string
[]
barcodeArray
=
barcode
.
Split
(
splitChar
);
int
index
=
-
1
;
int
index
=
-
1
;
foreach
(
string
posId
in
posIdArray
)
foreach
(
string
posId
in
posIdArray
)
{
{
index
++;
index
++;
int
.
TryParse
(
plateWArray
[
index
],
out
int
plateW
);
int
.
TryParse
(
plateWArray
[
index
],
out
int
plateW
);
int
.
TryParse
(
plateHArray
[
index
],
out
int
plateH
);
int
.
TryParse
(
plateHArray
[
index
],
out
int
plateH
);
var
code
=
barcodeArray
[
index
];
bool
isSingleOut
=
singleOutArray
[
index
].
ToLower
().
Equals
(
"true"
);
bool
isSingleOut
=
singleOutArray
[
index
].
ToLower
().
Equals
(
"true"
);
//根据发送的posId获取位置列表
//根据发送的posId获取位置列表
...
@@ -461,7 +458,7 @@ namespace DeviceLibrary
...
@@ -461,7 +458,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
JobInfo
outStoreJob
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
);
JobInfo
outStoreJob
=
new
JobInfo
(
code
,
posId
,
plateW
,
plateH
);
OutStoreEvent
.
Invoke
(
outStoreJob
);
OutStoreEvent
.
Invoke
(
outStoreJob
);
}
}
}
}
...
...
DeviceLibrary/packages.config
查看文件 @
10fea4c
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
packages
>
<
package
id
=
"Newtonsoft.Json"
version
=
"13.0.1"
targetFramework
=
"net461"
/>
<
package
id
=
"Newtonsoft.Json"
version
=
"13.0.1"
targetFramework
=
"net461"
/>
<
package
id
=
"SuperSocket.ClientEngine.Core"
version
=
"0.10.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Collections.Specialized"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Linq"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Net.NameResolution"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Net.Security"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Net.Sockets"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Runtime.Extensions"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Runtime.InteropServices"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Security.Cryptography.Algorithms"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Security.Cryptography.Encoding"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Security.Cryptography.Primitives"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Security.Cryptography.X509Certificates"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Text.RegularExpressions"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Threading"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Threading.Timer"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.ValueTuple"
version
=
"4.5.0"
targetFramework
=
"net461"
/>
<
package
id
=
"WebSocket4Net"
version
=
"0.15.2"
targetFramework
=
"net461"
/>
</
packages
>
</
packages
>
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
10fea4c
...
@@ -40,7 +40,7 @@ namespace DeviceLibrary
...
@@ -40,7 +40,7 @@ namespace DeviceLibrary
Config
=
_Config
;
Config
=
_Config
;
mainMachine
=
_mainMachine
;
mainMachine
=
_mainMachine
;
Msg
=
MsgService
.
MSList
[
mainMachine
.
MachineSide
];
Msg
=
MsgService
.
MSList
[
mainMachine
.
MachineSide
];
MoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0123"
,
"出入库
机构"
),
_mainMachine
.
MachineSide
,
false
);
MoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0123"
,
"出入库
轴"
),
_mainMachine
.
MachineSide
,
_mainMachine
.
CID
,
false
);
To
=
null
;
To
=
null
;
From
=
null
;
From
=
null
;
#
region
初始化伺服轴
#
region
初始化伺服轴
...
@@ -131,7 +131,7 @@ namespace DeviceLibrary
...
@@ -131,7 +131,7 @@ namespace DeviceLibrary
if
(!
IgnoreX09
&&
!
MoveInfo
.
MoveParam
.
ReelOnFixture
&&
IOManager
.
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
if
(!
IgnoreX09
&&
!
MoveInfo
.
MoveParam
.
ReelOnFixture
&&
IOManager
.
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(!
IgnoreX09
&&
IOMonitor
.
IODebound
(
SIO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
if
(!
IgnoreX09
&&
IOMonitor
.
IODebound
(
SIO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
Msg
.
add
(
string
.
Format
(
crc
.
GetString
(
"Res0124"
,
"出入库时料叉{0}检测到有物料无法继续,请检查."
)
,
Config
.
DIList
[
SIO_Type
.
TrayCheck_Fixture
].
ElectricalDefinition
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
Msg
.
add
(
string
.
Format
(
"取料时料叉{0}检测到有物料无法继续,请检查."
,
Config
.
DIList
[
SIO_Type
.
TrayCheck_Fixture
].
ElectricalDefinition
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
}
}
else
else
{
{
...
@@ -160,7 +160,7 @@ namespace DeviceLibrary
...
@@ -160,7 +160,7 @@ namespace DeviceLibrary
UpDown_Axis
.
AbsMove
(
MoveInfo
,
From
.
UpDown_PL
,
Config
.
UpDown_P1_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
From
.
UpDown_PL
,
Config
.
UpDown_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达取料低点{From.UpDown_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达取料低点{From.UpDown_PL}"
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
From
.
Middle_P2
,
Config
.
Middle_P2_speed
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
From
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走
机构
到达取料点{From.Middle_P2}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走
轴
到达取料点{From.Middle_P2}"
);
break
;
break
;
case
MoveStep
.
StoreTS04
:
case
MoveStep
.
StoreTS04
:
if
(
From
.
posid
==
BoxStorePosition
.
ngdoor
)
{
if
(
From
.
posid
==
BoxStorePosition
.
ngdoor
)
{
...
@@ -196,7 +196,7 @@ namespace DeviceLibrary
...
@@ -196,7 +196,7 @@ namespace DeviceLibrary
DoorControl
.
Invoke
(
false
);
DoorControl
.
Invoke
(
false
);
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
LOW
))
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
LOW
))
{
{
Msg
.
add
(
string
.
Format
(
crc
.
GetString
(
"Res0125"
,
"出库时料叉{0}没有检测到物料无法继续,请检查."
)
,
Config
.
DIList
[
SIO_Type
.
TrayCheck_Fixture
].
ElectricalDefinition
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
Msg
.
add
(
string
.
Format
(
"取料后料叉{0}没有检测到物料无法继续,请检查."
,
Config
.
DIList
[
SIO_Type
.
TrayCheck_Fixture
].
ElectricalDefinition
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
}
}
else
else
{
{
...
@@ -214,7 +214,7 @@ namespace DeviceLibrary
...
@@ -214,7 +214,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreFIX01
:
case
MoveStep
.
StoreFIX01
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Middle_P2
,
Config
.
Middle_P2_speed
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走
机构
到达目的地:{Fix.Middle_P2}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走
轴
到达目的地:{Fix.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{Fix.UpDown_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{Fix.UpDown_PH}"
);
break
;
break
;
...
@@ -246,7 +246,7 @@ namespace DeviceLibrary
...
@@ -246,7 +246,7 @@ namespace DeviceLibrary
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
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走
机构
到达目的地:{To.Middle_P2}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走
轴
到达目的地:{To.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
To
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
To
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{To.UpDown_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{To.UpDown_PH}"
);
break
;
break
;
...
@@ -288,7 +288,7 @@ namespace DeviceLibrary
...
@@ -288,7 +288,7 @@ namespace DeviceLibrary
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
To
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
ToOut
));
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
To
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
ToOut
));
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
Msg
.
add
(
string
.
Format
(
crc
.
GetString
(
"Res0128"
,
"入库后料叉{0}上任然检测到物料,请检查."
)
,
Config
.
DIList
[
SIO_Type
.
TrayCheck_Fixture
].
ElectricalDefinition
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
Msg
.
add
(
string
.
Format
(
"放料后料叉{0}上任然检测到物料,请检查."
,
Config
.
DIList
[
SIO_Type
.
TrayCheck_Fixture
].
ElectricalDefinition
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
}
}
else
else
{
{
...
@@ -345,10 +345,5 @@ namespace DeviceLibrary
...
@@ -345,10 +345,5 @@ namespace DeviceLibrary
{
{
InOutEndProcessEvent
?.
Invoke
(
posid
,
storeMoveType
,
true
);
InOutEndProcessEvent
?.
Invoke
(
posid
,
storeMoveType
,
true
);
}
}
HIKCamera
GetCamera
(
int
pos
)
{
//return pos > 0 ? RobotManage.CameraA : RobotManage.CameraB;
return
RobotManage
.
CameraA
;
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/theMachine/Common.cs
查看文件 @
10fea4c
...
@@ -15,6 +15,8 @@ namespace DeviceLibrary
...
@@ -15,6 +15,8 @@ namespace DeviceLibrary
{
{
public
class
Common
public
class
Common
{
{
/**获取角度*/
/**获取角度*/
// 求3点形成的夹角
// 求3点形成的夹角
public
static
float
getAngle2
(
Point
pt1
,
Point
pt2
,
Point
pt0
)
public
static
float
getAngle2
(
Point
pt1
,
Point
pt2
,
Point
pt0
)
...
...
DeviceLibrary/theMachine/IRobot.cs
查看文件 @
10fea4c
...
@@ -7,10 +7,10 @@ using System.Threading.Tasks;
...
@@ -7,10 +7,10 @@ using System.Threading.Tasks;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
public
interface
IRobot
<
T
>
where
T
:
Store_ConfigBase
public
interface
IRobot
{
{
//List<ConfigMoveAxis> moveAxisList { get; set; }
//List<ConfigMoveAxis> moveAxisList { get; set; }
T
Config
{
get
;
set
;
}
Store_ConfigBase
Config
{
get
;
set
;
}
string
Name
{
get
;
set
;
}
string
Name
{
get
;
set
;
}
bool
canRunning
{
get
;
set
;
}
bool
canRunning
{
get
;
set
;
}
...
@@ -25,6 +25,8 @@ namespace DeviceLibrary
...
@@ -25,6 +25,8 @@ namespace DeviceLibrary
event
EventHandler
<
bool
>
PauseEvent
;
event
EventHandler
<
bool
>
PauseEvent
;
void
BeginHomeReset
(
bool
firstRun
=
false
);
void
BeginHomeReset
(
bool
firstRun
=
false
);
bool
DoorLock
(
RequestLoadInfo
requestLoadInfo
);
bool
DoorRelease
(
RequestLoadInfo
requestLoadInfo
);
void
Run
();
void
Run
();
void
ShutDown
();
void
ShutDown
();
void
Stop
();
void
Stop
();
...
...
DeviceLibrary/theMachine/JobList.cs
查看文件 @
10fea4c
...
@@ -11,7 +11,7 @@ namespace DeviceLibrary
...
@@ -11,7 +11,7 @@ namespace DeviceLibrary
class
StoreJobList
class
StoreJobList
{
{
public
ConcurrentQueue
<
JobInfo
>
jobInfos
=
new
ConcurrentQueue
<
JobInfo
>();
public
ConcurrentQueue
<
JobInfo
>
jobInfos
=
new
ConcurrentQueue
<
JobInfo
>();
string
lastoutpos
=
""
;
string
lastoutpos
=
""
;
string
jobname
=
""
;
string
jobname
=
""
;
public
StoreJobList
(
string
jn
)
{
public
StoreJobList
(
string
jn
)
{
jobname
=
jn
;
jobname
=
jn
;
...
@@ -47,6 +47,7 @@ namespace DeviceLibrary
...
@@ -47,6 +47,7 @@ namespace DeviceLibrary
get
=>
jobInfos
.
Count
;
get
=>
jobInfos
.
Count
;
}
}
public
void
ClearLastPosid
(
string
posid
)
{
public
void
ClearLastPosid
(
string
posid
)
{
LogUtil
.
info
(
$
"[{jobname}] 清除正在执行的任务:cur:"
+
posid
+
",last:"
+
lastoutpos
);
if
(
lastoutpos
==
posid
)
if
(
lastoutpos
==
posid
)
lastoutpos
=
""
;
lastoutpos
=
""
;
}
}
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
10fea4c
...
@@ -11,103 +11,7 @@ using System.Text;
...
@@ -11,103 +11,7 @@ using System.Text;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
[
Serializable
]
public
class
ReelParam
{
/// <summary>
/// 创建新出入库信息
/// </summary>
/// <param name="wareNo">二维码内容</param>
/// <param name="platew">宽度</param>
/// <param name="plateh">高度</param>
/// <param name="IsNg">是否是入库NG料</param>
/// <param name="ngMsg">NG消息</param>
public
ReelParam
(
string
wareNo
=
""
,
int
platew
=
0
,
int
plateh
=
0
,
bool
_IsNg
=
false
,
string
ngMsg
=
""
)
{
WareCode
=
wareNo
;
PlateW
=
platew
;
PlateH
=
plateh
;
IsNg
=
_IsNg
;
NgMsg
=
ngMsg
;
}
/// <summary>
/// 物品二维码信息
/// </summary>
public
string
WareCode
{
get
;
set
;
}
/// <summary>
/// 库位号
/// </summary>
public
string
PosID
{
get
;
set
;
}
public
string
bitmapfilename
=
""
;
public
List
<
CodeInfo
>
codeInfos
{
get
;
set
;
}
/// <summary>
/// 料盘高度
/// </summary>
public
int
PlateH
{
get
;
set
;
}
/// <summary>
/// 料盘宽度
/// </summary>
public
int
PlateW
{
get
;
set
;
}
/// <summary>
/// 是否是入料NG料
/// </summary>
public
bool
IsNg
=
false
;
/// <summary>
/// 入料NG消息
/// </summary>
public
string
NgMsg
=
""
;
/// <summary>
/// 物料编码
/// </summary>
public
string
PN
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
int
QTY
{
get
;
set
;
}
=
0
;
/// <summary>
/// 厂家代码
/// </summary>
public
string
FC
{
get
;
set
;
}
/// <summary>
/// 唯一序列号
/// </summary>
public
string
RI
{
get
;
set
;
}
/// <summary>
/// 批次号
/// </summary>
public
string
Batch
{
get
;
set
;
}
public
bool
ReelOnFixture
{
get
;
internal
set
;
}
=
false
;
public
int
HeightPos
=
0
;
public
ReelParam
clone
()
{
ReelParam
dstobject
;
using
(
MemoryStream
mStream
=
new
MemoryStream
())
{
BinaryFormatter
bf
=
new
BinaryFormatter
();
bf
.
Serialize
(
mStream
,
this
);
mStream
.
Seek
(
0
,
SeekOrigin
.
Begin
);
//指定当前流的位置为流的开头。
dstobject
=
(
ReelParam
)
bf
.
Deserialize
(
mStream
);
mStream
.
Close
();
}
return
dstobject
;
}
public
string
ToStr
()
{
if
(
IsNg
)
{
return
crc
.
GetString
(
"Res0129"
,
"入库NG"
)+
$
":{NgMsg}[{WareCode}]"
;
}
else
{
return
crc
.
GetString
(
"Res0130"
,
"库位号"
)
+
$
":[{PosID}][{WareCode}] "
;
}
}
}
[
Serializable
]
[
Serializable
]
class
BoxStorePosition
{
class
BoxStorePosition
{
...
@@ -153,13 +57,13 @@ namespace DeviceLibrary
...
@@ -153,13 +57,13 @@ namespace DeviceLibrary
if
(
FixtureConfig
.
GetFixtureHeight
(
aCStorePosition
.
BagWidth
,
aCStorePosition
.
BagHigh
,
out
int
actualheight
))
if
(
FixtureConfig
.
GetFixtureHeight
(
aCStorePosition
.
BagWidth
,
aCStorePosition
.
BagHigh
,
out
int
actualheight
))
BagHigh
=
actualheight
;
BagHigh
=
actualheight
;
Comp_PH
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
BagHigh
-
8
+
Config
.
Comp_PH_MM
);
Comp_PH
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
BagHigh
-
70
+
Config
.
Comp_PH_MM
);
int
ReelHeight
=
reel
.
PlateH
;
int
ReelHeight
=
reel
.
PlateH
;
if
(
FixtureConfig
.
GetFixtureHeight
(
reel
.
PlateW
,
reel
.
PlateH
,
out
int
actualheight1
))
if
(
FixtureConfig
.
GetFixtureHeight
(
reel
.
PlateW
,
reel
.
PlateH
,
out
int
actualheight1
))
ReelHeight
=
actualheight1
;
ReelHeight
=
actualheight1
;
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
ReelHeight
-
8
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
ReelHeight
-
70
);
Comp_PH
=
Comp_PH
<
0
?
0
:
Comp_PH
;
Comp_PH
=
Comp_PH
<
0
?
0
:
Comp_PH
;
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
posid
=
aCStorePosition
.
PositionNum
;
posid
=
aCStorePosition
.
PositionNum
;
...
@@ -174,8 +78,8 @@ namespace DeviceLibrary
...
@@ -174,8 +78,8 @@ namespace DeviceLibrary
if
(
FixtureConfig
.
GetFixtureHeight
(
reel
.
PlateW
,
reel
.
PlateH
,
out
int
actualheight
))
if
(
FixtureConfig
.
GetFixtureHeight
(
reel
.
PlateW
,
reel
.
PlateH
,
out
int
actualheight
))
Height
=
actualheight
;
Height
=
actualheight
;
Comp_PH
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
Height
-
8
+
Config
.
Comp_PH_MM
);
Comp_PH
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
Height
-
70
+
Config
.
Comp_PH_MM
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
Height
-
8
);
Comp_PL
=
Config
.
Comp_P2
-
Config
.
Comp_PoToMM
*
(
Height
-
70
);
Comp_PH
=
Comp_PH
<
0
?
0
:
Comp_PH
;
Comp_PH
=
Comp_PH
<
0
?
0
:
Comp_PH
;
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
if
(
storeSide
==
StoreSide
.
NGDoor
)
if
(
storeSide
==
StoreSide
.
NGDoor
)
...
...
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
查看文件 @
10fea4c
...
@@ -112,7 +112,7 @@ namespace DeviceLibrary
...
@@ -112,7 +112,7 @@ namespace DeviceLibrary
foreach
(
var
ledcolor
in
ledcfg
.
Keys
)
foreach
(
var
ledcolor
in
ledcfg
.
Keys
)
{
{
if
(
ledcfg
[
ledcolor
]
==
LedState
.
none
)
if
(
ledcfg
[
ledcolor
]
==
LedState
.
none
)
return
;
continue
;
Led
.
LedColors
[
ledcolor
].
LedState
=
ledcfg
[
ledcolor
];
Led
.
LedColors
[
ledcolor
].
LedState
=
ledcfg
[
ledcolor
];
}
}
}
}
...
@@ -154,6 +154,7 @@ namespace DeviceLibrary
...
@@ -154,6 +154,7 @@ namespace DeviceLibrary
if
(
runStatus
!=
RunStatus
.
Stop
&&
isAlarm
)
if
(
runStatus
!=
RunStatus
.
Stop
&&
isAlarm
)
{
{
ProcessLefCfg
(
MachineLedStateE
.
Alarm
);
ProcessLefCfg
(
MachineLedStateE
.
Alarm
);
AlarmBuzzer
.
ON
();
}
}
Led
.
LedGroup
.
ForEach
((
x
)
=>
{
x
.
run
();
});
Led
.
LedGroup
.
ForEach
((
x
)
=>
{
x
.
run
();
});
}
}
...
...
DeviceLibrary/theMachine/MoveInfo.cs
查看文件 @
10fea4c
...
@@ -12,8 +12,10 @@ namespace DeviceLibrary
...
@@ -12,8 +12,10 @@ namespace DeviceLibrary
{
{
public
static
Dictionary
<
MachineSideE
,
List
<
MoveInfo
>>
List
=
new
Dictionary
<
MachineSideE
,
List
<
MoveInfo
>>();
public
static
Dictionary
<
MachineSideE
,
List
<
MoveInfo
>>
List
=
new
Dictionary
<
MachineSideE
,
List
<
MoveInfo
>>();
public
int
TimeOutSeconds
=
60
;
public
int
TimeOutSeconds
=
60
;
public
MoveInfo
(
string
name
,
MachineSideE
machineSide
,
bool
addtolist
=
true
)
string
CID
;
public
MoveInfo
(
string
name
,
MachineSideE
machineSide
,
string
cid
,
bool
addtolist
=
true
)
{
{
CID
=
cid
;
MoveParam
=
new
ReelParam
();
MoveParam
=
new
ReelParam
();
this
.
moveStep
=
MoveStep
.
Wait
;
this
.
moveStep
=
MoveStep
.
Wait
;
IsInWait
=
false
;
IsInWait
=
false
;
...
@@ -111,7 +113,7 @@ namespace DeviceLibrary
...
@@ -111,7 +113,7 @@ namespace DeviceLibrary
}
}
string
lastmsg
=
""
;
string
lastmsg
=
""
;
public
void
log
(
string
msg
)
{
public
void
log
(
string
msg
)
{
msg
=
$
"[{Name}][{moveStep}][{MoveParam.PosID}-{MoveParam.WareCode}]{msg}"
;
msg
=
$
"[{
CID}][{
Name}][{moveStep}][{MoveParam.PosID}-{MoveParam.WareCode}]{msg}"
;
if
(
String
.
Compare
(
lastmsg
,
msg
,
StringComparison
.
Ordinal
)!=
0
)
if
(
String
.
Compare
(
lastmsg
,
msg
,
StringComparison
.
Ordinal
)!=
0
)
{
{
...
@@ -119,11 +121,20 @@ namespace DeviceLibrary
...
@@ -119,11 +121,20 @@ namespace DeviceLibrary
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
}
}
}
}
public
void
error
(
string
msg
)
{
msg
=
$
"[{CID}][{Name}][{moveStep}][{MoveParam.PosID}-{MoveParam.WareCode}]{msg}"
;
if
(
String
.
Compare
(
lastmsg
,
msg
,
StringComparison
.
Ordinal
)!=
0
)
{
lastmsg
=
msg
;
LogUtil
.
error
(
msg
);
}
}
string
lasterrmsg
=
""
;
string
lasterrmsg
=
""
;
public
void
errlog
(
string
msg
)
public
void
errlog
(
string
msg
)
{
{
msg
=
$
"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}"
;
msg
=
$
"[{
CID}][{
Name}][{moveStep}][{MoveParam.WareCode}]{msg}"
;
if
(
String
.
Compare
(
lasterrmsg
,
msg
,
StringComparison
.
Ordinal
)
!=
0
)
if
(
String
.
Compare
(
lasterrmsg
,
msg
,
StringComparison
.
Ordinal
)
!=
0
)
{
{
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
10fea4c
...
@@ -130,6 +130,7 @@ namespace DeviceLibrary
...
@@ -130,6 +130,7 @@ namespace DeviceLibrary
StoreOut16
,
StoreOut16
,
StoreOut17
,
StoreOut17
,
StoreOut18
,
StoreOut18
,
StoreOut_WaitMT
,
StoreTS01
,
StoreTS01
,
StoreTS02
,
StoreTS02
,
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
10fea4c
...
@@ -21,7 +21,7 @@ namespace DeviceLibrary
...
@@ -21,7 +21,7 @@ namespace DeviceLibrary
public
static
R_Config
RConfig
;
public
static
R_Config
RConfig
;
public
static
L_Config
LConfig
;
public
static
L_Config
LConfig
;
public
static
List
<
IRobot
<
Store_ConfigBase
>>
Stores
=
new
List
<
IRobot
<
Store_ConfigBase
>
>();
public
static
List
<
IRobot
>
Stores
=
new
List
<
IRobot
>();
public
static
bool
IsLoadOk
=
true
;
public
static
bool
IsLoadOk
=
true
;
public
static
bool
IsConfigMode
=
false
;
public
static
bool
IsConfigMode
=
false
;
public
static
bool
InoutDebugMode
=
false
;
public
static
bool
InoutDebugMode
=
false
;
...
...
DeviceLibrary/theMachine/Store/StoreMachine.cs
查看文件 @
10fea4c
...
@@ -17,7 +17,7 @@ namespace DeviceLibrary
...
@@ -17,7 +17,7 @@ namespace DeviceLibrary
[
Flags
]
[
Flags
]
public
enum
MachineSideE
{
Right
=
1
,
Left
=
2
}
public
enum
MachineSideE
{
Right
=
1
,
Left
=
2
}
public
partial
class
StoreMachine
:
IRobot
<
Store_ConfigBase
>
public
partial
class
StoreMachine
:
IRobot
{
{
public
string
Name
{
get
;
set
;
}
=
"SISO"
;
public
string
Name
{
get
;
set
;
}
=
"SISO"
;
private
bool
_canRunning
=
true
;
private
bool
_canRunning
=
true
;
...
@@ -80,6 +80,8 @@ namespace DeviceLibrary
...
@@ -80,6 +80,8 @@ namespace DeviceLibrary
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
ServerCommunication
ServerCM
;
ServerCommunication
ServerCM
;
public
RemoteClient
Remote
;
/// <summary>
/// <summary>
/// 开始运行的时间
/// 开始运行的时间
/// </summary>
/// </summary>
...
@@ -100,7 +102,7 @@ namespace DeviceLibrary
...
@@ -100,7 +102,7 @@ namespace DeviceLibrary
return
_positionNumList
;
return
_positionNumList
;
}
}
}
}
public
string
CID
=
""
;
public
StoreMachine
(
Store_ConfigBase
_config
,
Robot_Config
mainConfig
,
MachineSideE
machineSide
,
out
string
msg
)
{
public
StoreMachine
(
Store_ConfigBase
_config
,
Robot_Config
mainConfig
,
MachineSideE
machineSide
,
out
string
msg
)
{
msg
=
""
;
msg
=
""
;
Config
=
_config
;
Config
=
_config
;
...
@@ -108,11 +110,23 @@ namespace DeviceLibrary
...
@@ -108,11 +110,23 @@ namespace DeviceLibrary
MachineSide
=
machineSide
;
MachineSide
=
machineSide
;
Msg
=
new
MsgService
(
MachineSide
);
Msg
=
new
MsgService
(
MachineSide
);
Name
=
machineSide
.
ToString
()
+
"-SISO"
;
Name
=
machineSide
.
ToString
()
+
"-SISO"
;
CID
=
ConfigHelper
.
Config
.
Get
(
$
"Device_{MachineSide}_CID"
,
"AMH-SBDH2-1"
);
Name
=
CID
;
LogUtil
.
info
(
"加载到CID"
+
CID
);
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
StoreMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0138"
,
"进出库调度"
),
machineSide
);
Remote
=
new
RemoteClient
(
CID
,
Setting_Init
.
Device_MT_Server
);
Remote
.
AddAction
(
"DoorRelease"
,
(
requestLoadInfo
)
=>
{
return
DoorRelease
(
requestLoadInfo
);
});
Remote
.
AddAction
(
"DoorLock"
,
(
requestLoadInfo
)
=>
{
return
DoorLock
(
requestLoadInfo
);
});
StoreMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0138"
,
"进出库调度"
),
machineSide
,
CID
);
StoreMoveInfo
.
SetStateDelegate
(
StoreState
);
StoreMoveInfo
.
SetStateDelegate
(
StoreState
);
ResetMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0139"
,
"重置"
),
machineSide
);
ResetMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0139"
,
"重置"
),
machineSide
,
CID
);
AIOTMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0140"
,
"出入库测试"
),
machineSide
);
AIOTMoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
"Res0140"
,
"出入库测试"
),
machineSide
,
CID
);
ServerCM
=
new
ServerCommunication
(
this
);
ServerCM
=
new
ServerCommunication
(
this
);
ServerCM
.
InStoreEvent
+=
ServerCM_InStoreEvent1
;
ServerCM
.
InStoreEvent
+=
ServerCM_InStoreEvent1
;
ServerCM
.
OutStoreEvent
+=
ServerCM_OutStoreEvent
;
ServerCM
.
OutStoreEvent
+=
ServerCM_OutStoreEvent
;
...
@@ -141,7 +155,7 @@ namespace DeviceLibrary
...
@@ -141,7 +155,7 @@ namespace DeviceLibrary
string
positionConfigFile
=
Path
.
Combine
(
baseDir
,
"StoreConfig\\"
+
machineSide
.
ToString
()+
"\\linePositions.csv"
);
string
positionConfigFile
=
Path
.
Combine
(
baseDir
,
"StoreConfig\\"
+
machineSide
.
ToString
()+
"\\linePositions.csv"
);
if
(
File
.
Exists
(
positionConfigFile
))
if
(
File
.
Exists
(
positionConfigFile
))
{
{
LogUtil
.
info
(
$
"加载{Name}位置文件:"
+
positionConfigFile
);
ResetMoveInfo
.
log
(
$
"加载{Name}位置文件:"
+
positionConfigFile
);
StorePosition
=
StorePosition
.
Concat
(
CSVPositionReader
<
ACStorePosition
>.
AddCSVFile
(
positionConfigFile
)).
ToDictionary
(
k
=>
k
.
Key
,
v
=>
v
.
Value
);
StorePosition
=
StorePosition
.
Concat
(
CSVPositionReader
<
ACStorePosition
>.
AddCSVFile
(
positionConfigFile
)).
ToDictionary
(
k
=>
k
.
Key
,
v
=>
v
.
Value
);
}
}
else
else
...
@@ -152,10 +166,12 @@ namespace DeviceLibrary
...
@@ -152,10 +166,12 @@ namespace DeviceLibrary
if
(
File
.
Exists
(
fixpositionConfigFile
))
if
(
File
.
Exists
(
fixpositionConfigFile
))
{
{
haveFixpos
=
true
;
haveFixpos
=
true
;
LogUtil
.
info
(
$
"加载{Name}校准库位文件:"
+
fixpositionConfigFile
);
ResetMoveInfo
.
log
(
$
"加载{Name}校准库位文件:"
+
fixpositionConfigFile
);
StorePosition
=
StorePosition
.
Concat
(
CSVPositionReader
<
ACStorePosition
>.
AddCSVFile
(
fixpositionConfigFile
)).
ToDictionary
(
k
=>
k
.
Key
,
v
=>
v
.
Value
);
StorePosition
=
StorePosition
.
Concat
(
CSVPositionReader
<
ACStorePosition
>.
AddCSVFile
(
fixpositionConfigFile
)).
ToDictionary
(
k
=>
k
.
Key
,
v
=>
v
.
Value
);
}
}
IOMonitor
.
RegisterIO
(
IO_Type
.
Reset_BTN
,
RobotManage
.
Config
,
IO_VALUE
.
HIGH
,
Reset_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
Reset_BTN
,
RobotManage
.
Config
,
IO_VALUE
.
HIGH
,
Reset_BTN
,
2500
,
100
);
}
}
private
bool
BoxTransport_DoorControl
(
bool
arg
)
private
bool
BoxTransport_DoorControl
(
bool
arg
)
...
@@ -183,7 +199,7 @@ namespace DeviceLibrary
...
@@ -183,7 +199,7 @@ namespace DeviceLibrary
private
void
ServerCM_OutStoreEvent
(
JobInfo
jobInfo
)
private
void
ServerCM_OutStoreEvent
(
JobInfo
jobInfo
)
{
{
AddOutStoreTask
(
jobInfo
.
PosId
,
jobInfo
.
plateW
,
jobInfo
.
plateH
);
AddOutStoreTask
(
jobInfo
.
WareNum
,
jobInfo
.
PosId
,
jobInfo
.
plateW
,
jobInfo
.
plateH
);
}
}
private
bool
ServerCM_InStoreEvent1
(
JobInfo
jobInfo
,
bool
ng
,
string
msg
)
private
bool
ServerCM_InStoreEvent1
(
JobInfo
jobInfo
,
bool
ng
,
string
msg
)
...
@@ -226,12 +242,19 @@ namespace DeviceLibrary
...
@@ -226,12 +242,19 @@ namespace DeviceLibrary
var
updownindoor
=
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P2
)
||
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P3
);
var
updownindoor
=
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P2
)
||
UpDown_Axis
.
IsInPosition
(
Config
.
UpDown_P3
);
var
ismiddleatdoor
=
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P1
)
||
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P2
);
var
ismiddleatdoor
=
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P1
)
||
Middle_Axis
.
IsInPosition
(
Config
.
Middle_P2
);
if
(
ismiddleatdoor
&&
updownindoor
&&
IOValue
(
SIO_Type
.
Door_Open
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
ismiddleatdoor
&&
updownindoor
&&
IOValue
(
SIO_Type
.
Door_Open
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
return
(
false
,
""
);
return
(
false
,
""
);
}
}
else
else
return
(
true
,
crc
.
GetString
(
"Res0142"
,
"单料门没有打开进出轴无法伸出"
));
{
if
(
IOValue
(
SIO_Type
.
Door_Open
,
Config
).
Equals
(
IO_VALUE
.
LOW
))
return
(
true
,
crc
.
GetString
(
"Res0142"
,
"单料门没有打开进出轴无法伸出"
));
if
(!
updownindoor
)
return
(
true
,
"升降轴不在P2或P3点"
);
if
(!
ismiddleatdoor
)
return
(
true
,
"旋转轴不在P1或P2点"
);
}
return
(
false
,
""
);
return
(
false
,
""
);
}
}
private
(
bool
,
string
)
Middle_Axis_interference
(
int
from
,
int
to
)
private
(
bool
,
string
)
Middle_Axis_interference
(
int
from
,
int
to
)
...
@@ -302,7 +325,7 @@ namespace DeviceLibrary
...
@@ -302,7 +325,7 @@ namespace DeviceLibrary
if
(
m
.
Find
((
aa
)
=>
aa
.
msgLevel
==
MsgLevel
.
alarm
)
==
null
)
if
(
m
.
Find
((
aa
)
=>
aa
.
msgLevel
==
MsgLevel
.
alarm
)
==
null
)
{
{
hasAlarm
=
false
;
hasAlarm
=
false
;
AlarmBuzzer
.
OFF
();
//
AlarmBuzzer.OFF();
if
(
ServerCM
.
storeStatus
!=
StoreStatus
.
InStoreExecute
if
(
ServerCM
.
storeStatus
!=
StoreStatus
.
InStoreExecute
&&
ServerCM
.
storeStatus
!=
StoreStatus
.
OutStoreExecute
&&
ServerCM
.
storeStatus
!=
StoreStatus
.
OutStoreExecute
&&
ServerCM
.
storeStatus
!=
StoreStatus
.
ResetMove
&&
ServerCM
.
storeStatus
!=
StoreStatus
.
StoreOnline
)
&&
ServerCM
.
storeStatus
!=
StoreStatus
.
ResetMove
&&
ServerCM
.
storeStatus
!=
StoreStatus
.
StoreOnline
)
...
@@ -313,7 +336,7 @@ namespace DeviceLibrary
...
@@ -313,7 +336,7 @@ namespace DeviceLibrary
}
}
else
{
else
{
hasAlarm
=
true
;
hasAlarm
=
true
;
AlarmBuzzer
.
ON
();
//
AlarmBuzzer.ON();
currnetstoreStatus
=
isInSuddenDown
?
StoreStatus
.
SuddenStop
:
StoreStatus
.
Warning
;
currnetstoreStatus
=
isInSuddenDown
?
StoreStatus
.
SuddenStop
:
StoreStatus
.
Warning
;
}
}
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
...
@@ -381,7 +404,8 @@ namespace DeviceLibrary
...
@@ -381,7 +404,8 @@ namespace DeviceLibrary
ResetMoveInfo
.
log
(
"开始回原"
);
ResetMoveInfo
.
log
(
"开始回原"
);
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
ServerCM
.
storeStatus
=
StoreStatus
.
ResetMove
;
Msg
.
add
(
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
Msg
.
add
(
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset_01
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset_01
);
break
;
break
;
case
MoveStep
.
H02_HomeReset_01
:
case
MoveStep
.
H02_HomeReset_01
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset
);
...
@@ -565,6 +589,7 @@ namespace DeviceLibrary
...
@@ -565,6 +589,7 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
configMoveAxis
.
ProName
,
configMoveAxis
.
Explain
)
+
$
"[{configMoveAxis.GetAxisValue()}]:"
Msg
.
add
(
crc
.
GetString
(
configMoveAxis
.
ProName
,
configMoveAxis
.
Explain
)
+
$
"[{configMoveAxis.GetAxisValue()}]:"
+
crc
.
GetString
(
"Res0150"
,
"运动报警"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
+
crc
.
GetString
(
"Res0150"
,
"运动报警"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
ok
=
false
;
ok
=
false
;
LogUtil
.
error
(
string
.
Join
(
","
,
HuichuanLibrary
.
HCBoardManager
.
GetAxisErrorDetail
(
configMoveAxis
.
GetAxisValue
())));
}
}
}
}
}
}
...
...
DeviceLibrary/theMachine/Store/StoreMachine_AutoInOutTest.cs
查看文件 @
10fea4c
...
@@ -56,6 +56,38 @@ namespace DeviceLibrary
...
@@ -56,6 +56,38 @@ namespace DeviceLibrary
return
true
;
return
true
;
}
}
public
bool
ManualIn
(
int
posindex
,
out
string
errmsg
)
{
errmsg
=
""
;
if
(
boxTransport
.
IsComplateOrFree
)
{
if
(!
boxTransport
.
IgnoreX09
&&
IOValue
(
SIO_Type
.
TrayCheck_Fixture
,
Config
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(!
boxTransport
.
IgnoreX09
&&
IOMonitor
.
IODebound
(
SIO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
{
errmsg
=
crc
.
GetString
(
"Res0152"
,
"收到出库任务,但料叉上有料,无法启动,请检查"
);
}
else
errmsg
=
crc
.
GetString
(
"Res0152"
,
"收到出库任务,但料叉上有料,无法启动,请检查"
);
return
false
;
}
else
boxTransport
.
IgnoreX09
=
false
;
CurrentPosIndex
=
posindex
;
StopAutoInOut
=
true
;
AIOTMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
AIOTMoveInfo
.
log
(
$
"开始入库任务:"
+
StorePosition
.
Values
.
ToArray
()[
posindex
].
PositionNum
);
}
else
{
errmsg
=
crc
.
GetString
(
"Res0153"
,
"料仓正在出入库中,无法出库"
);
}
return
true
;
}
public
void
StopAutoInOutTest
()
public
void
StopAutoInOutTest
()
{
{
StopAutoInOut
=
true
;
StopAutoInOut
=
true
;
...
@@ -105,6 +137,11 @@ namespace DeviceLibrary
...
@@ -105,6 +137,11 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn02
:
case
MoveStep
.
StoreIn02
:
if
(
boxTransport
.
IsTakedReel
)
if
(
boxTransport
.
IsTakedReel
)
{
{
if
(
StopAutoInOut
)
{
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn04
);
AIOTMoveInfo
.
log
(
$
"不在自动测试模式, 直接结束1"
);
}
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
AIOTMoveInfo
.
log
(
$
"第一盘料盘已取走"
);
AIOTMoveInfo
.
log
(
$
"第一盘料盘已取走"
);
}
}
...
@@ -126,6 +163,12 @@ namespace DeviceLibrary
...
@@ -126,6 +163,12 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn04
:
case
MoveStep
.
StoreIn04
:
if
(
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsComplateOrFree
)
{
{
if
(
StopAutoInOut
)
{
AIOTMoveInfo
.
log
(
$
"不在自动测试模式, 直接结束2"
);
AIOTMoveInfo
.
EndMove
();
return
;
}
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
AIOTMoveInfo
.
log
(
$
"第一盘料盘已到达目的地"
);
AIOTMoveInfo
.
log
(
$
"第一盘料盘已到达目的地"
);
if
(
CurrentPosIndex
-
1
<
0
||
StopAutoInOut
)
if
(
CurrentPosIndex
-
1
<
0
||
StopAutoInOut
)
...
...
DeviceLibrary/theMachine/Store/StoreMachine_Common.cs
查看文件 @
10fea4c
using
OnlineStore
;
using
Newtonsoft.Json
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
...
@@ -12,6 +13,32 @@ namespace DeviceLibrary
...
@@ -12,6 +13,32 @@ namespace DeviceLibrary
{
{
partial
class
StoreMachine
partial
class
StoreMachine
{
{
/// <summary>
/// 发送托盘需求
/// </summary>
/// <param name="TrayType"></param>
public
RemoteResult
SendTrayRequest
(
string
TrayType
,
ReelParam
reelParam
)
{
RemoteLoad
remoteLoad
=
new
RemoteLoad
();
remoteLoad
.
Action
=
"SetTrayRequest"
;
remoteLoad
.
GroupName
=
CID
;
remoteLoad
.
RequestLoadInfo
=
new
RequestLoadInfo
();
remoteLoad
.
RequestLoadInfo
.
TrayType
=
TrayType
;
remoteLoad
.
RequestLoadInfo
.
LoadParam
=
reelParam
.
clone
();
remoteLoad
.
RequestLoadInfo
.
DeviceGroupName
=
StoreCID
.
AMH_ML5_1
;
remoteLoad
.
RequestLoadInfo
.
IsEmpty
=
true
;
return
Remote
.
SendAndWait
(
remoteLoad
);
}
public
RemoteResult
IsLineFree
()
{
RemoteLoad
remoteLoad
=
new
RemoteLoad
();
remoteLoad
.
Action
=
"IsFree"
;
remoteLoad
.
GroupName
=
CID
;
remoteLoad
.
RequestLoadInfo
=
new
RequestLoadInfo
();
return
Remote
.
SendAndWait
(
remoteLoad
);
}
public
void
StopMove
(
bool
ServoOff
=
false
)
public
void
StopMove
(
bool
ServoOff
=
false
)
{
{
runStatus
=
RunStatus
.
Stop
;
runStatus
=
RunStatus
.
Stop
;
...
@@ -117,7 +144,7 @@ namespace DeviceLibrary
...
@@ -117,7 +144,7 @@ namespace DeviceLibrary
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W013_Action
))
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W013_Action
))
{
{
wait
.
IsEnd
=
wait
.
Action
.
Invoke
(
wait
);
wait
.
IsEnd
=
wait
.
Action
.
Invoke
(
wait
);
LogUtil
.
info
(
$
"{Name}
自定义等待 IsEnd={wait.IsEnd},Type={wait.Action.GetType()}"
);
MoveInfo
.
log
(
$
"
自定义等待 IsEnd={wait.IsEnd},Type={wait.Action.GetType()}"
);
}
}
...
@@ -145,7 +172,7 @@ namespace DeviceLibrary
...
@@ -145,7 +172,7 @@ namespace DeviceLibrary
}
}
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
{
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
$
"]"
+
"等待"
+
"
}"
+
NotOkMsg
+
"超时"
+
"}["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒
"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
$
"]"
+
"等待"
+
"
{"
+
NotOkMsg
+
"超时"
+
"}
"
;
int
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
int
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
if
(
second
>
120
)
if
(
second
>
120
)
...
@@ -156,7 +183,7 @@ namespace DeviceLibrary
...
@@ -156,7 +183,7 @@ namespace DeviceLibrary
{
{
second
=
10
;
second
=
10
;
}
}
LogUtil
.
error
(
WarnMsg
,
logType
+
100
,
second
);
MoveInfo
.
error
(
WarnMsg
);
//MoveInfo.errlog(WarnMsg);
//MoveInfo.errlog(WarnMsg);
//Alarm(AlarmType.IoSingleTimeOut, WarnMsg);
//Alarm(AlarmType.IoSingleTimeOut, WarnMsg);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
alarm
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
alarm
);
...
@@ -180,20 +207,20 @@ namespace DeviceLibrary
...
@@ -180,20 +207,20 @@ namespace DeviceLibrary
{
{
return
;
return
;
}
}
LogUtil
.
error
(
Name
+
"
报警,报警类型:"
+
_alarmType
);
LogUtil
.
error
(
"["
+
Name
+
"]"
+
"
报警,报警类型:"
+
_alarmType
);
this
.
alarmType
=
_alarmType
;
this
.
alarmType
=
_alarmType
;
if
(
_alarmType
.
Equals
(
AlarmType
.
AxisAlarm
)
||
_alarmType
.
Equals
(
AlarmType
.
AxisMoveError
))
if
(
_alarmType
.
Equals
(
AlarmType
.
AxisAlarm
)
||
_alarmType
.
Equals
(
AlarmType
.
AxisMoveError
))
{
{
LogUtil
.
error
(
Name
+
"轴报警, 停止运动, 打开报警灯"
);
LogUtil
.
error
(
"["
+
Name
+
"]"
+
"轴报警, 停止运动, 打开报警灯"
);
StopMove
(
true
);
StopMove
(
true
);
}
}
else
if
(
_alarmType
==
AlarmType
.
SuddenStop
)
else
if
(
_alarmType
==
AlarmType
.
SuddenStop
)
{
{
//isInSuddenDown = true;
//isInSuddenDown = true;
LogUtil
.
error
(
Name
+
"收到急停信号,停止运动, 打开报警灯 "
);
LogUtil
.
error
(
"["
+
Name
+
"]"
+
"收到急停信号,停止运动, 打开报警灯 "
);
StopMove
(
true
);
StopMove
(
true
);
//storeStatus = StoreStatus.SuddenStop;
//storeStatus = StoreStatus.SuddenStop;
}
}
...
@@ -250,7 +277,7 @@ namespace DeviceLibrary
...
@@ -250,7 +277,7 @@ namespace DeviceLibrary
Thread
.
Sleep
(
msTime
);
Thread
.
Sleep
(
msTime
);
IO_VALUE
tValue
=
value
.
Equals
(
IO_VALUE
.
HIGH
)
?
IO_VALUE
.
LOW
:
IO_VALUE
.
HIGH
;
IO_VALUE
tValue
=
value
.
Equals
(
IO_VALUE
.
HIGH
)
?
IO_VALUE
.
LOW
:
IO_VALUE
.
HIGH
;
LogUtil
.
info
(
Name
+
"
定时回写IO: ["
+
IoType
+
"]=["
+
value
+
"],msTime="
+
msTime
);
LogUtil
.
info
(
"["
+
Name
+
"]
定时回写IO: ["
+
IoType
+
"]=["
+
value
+
"],msTime="
+
msTime
);
IOManager
.
IOMove
(
IoType
,
tValue
,
config
);
IOManager
.
IOMove
(
IoType
,
tValue
,
config
);
});
});
...
...
DeviceLibrary/theMachine/Store/StoreMachine_Store.cs
查看文件 @
10fea4c
...
@@ -18,11 +18,52 @@ namespace DeviceLibrary
...
@@ -18,11 +18,52 @@ namespace DeviceLibrary
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
""
);
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
""
);
public
void
AddOutStoreTask
(
string
posId
,
int
plateW
,
int
plateH
)
{
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
{
JobInfo
jobInfo
=
new
JobInfo
(
""
,
posId
,
plateW
,
plateH
);
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
}
}
public
bool
DoorRelease
(
RequestLoadInfo
requestLoadInfo
)
{
if
(
requestLoadInfo
.
IsEmpty
)
{
var
s
=
IOValue
(
SIO_Type
.
Door_Tray_Check
,
Config
);
StoreMoveInfo
.
log
(
"释放舱门时 TrayCheck_Door="
+
s
);
return
s
.
Equals
(
IO_VALUE
.
LOW
);
}
else
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
StoreMoveInfo
.
MoveParam
=
requestLoadInfo
.
LoadParam
.
clone
();
}
return
true
;
}
public
bool
DoorLock
(
RequestLoadInfo
requestLoadInfo
)
{
if
(
StoreMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
!
requestLoadInfo
.
IsEmpty
)
{
var
s
=
IOValue
(
SIO_Type
.
Door_Tray_Check
,
Config
);
if
(
s
.
Equals
(
IO_VALUE
.
LOW
))
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitInStore
);
LogUtil
.
info
(
"锁定料仓等待入库"
);
return
true
;
}
else
{
LogUtil
.
info
(
"料仓口有料无法锁定"
);
return
false
;
}
}
else
if
(
StoreMoveInfo
.
MoveStep
==
MoveStep
.
StoreOut_WaitMT
&&
requestLoadInfo
.
IsEmpty
)
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut14
);
StoreMoveInfo
.
log
(
"出库等待中.允许取走料盘"
);
return
true
;
}
else
{
StoreMoveInfo
.
log
(
"料仓忙碌中,不可锁定"
);
return
false
;
}
}
void
StoreProcess
()
void
StoreProcess
()
{
{
if
(
CheckWait
(
StoreMoveInfo
))
if
(
CheckWait
(
StoreMoveInfo
))
...
@@ -31,6 +72,7 @@ namespace DeviceLibrary
...
@@ -31,6 +72,7 @@ namespace DeviceLibrary
switch
(
StoreMoveInfo
.
MoveStep
)
switch
(
StoreMoveInfo
.
MoveStep
)
{
{
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
//判断有没有出库任务, 需要入库空闲, 出口空闲
//判断有没有出库任务, 需要入库空闲, 出口空闲
if
(
IOMonitor
.
IODebound
(
SIO_Type
.
Door_Tray_Check
,
Config
,
IO_VALUE
.
LOW
,
2000
)
&&
OutStoreJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
)
if
(
IOMonitor
.
IODebound
(
SIO_Type
.
Door_Tray_Check
,
Config
,
IO_VALUE
.
LOW
,
2000
)
&&
OutStoreJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
)
{
{
...
@@ -49,11 +91,13 @@ namespace DeviceLibrary
...
@@ -49,11 +91,13 @@ namespace DeviceLibrary
if
(
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
if
(
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
{
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut10
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut10
);
StoreMoveInfo
.
MoveParam
.
WareCode
=
jobInfo
.
WareNum
;
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
return
;
}
}
}
}
if
(!
AutoInOutTest
&&
IOMonitor
.
IODebound
(
SIO_Type
.
Door_Tray_Check
,
Config
,
IO_VALUE
.
HIGH
,
1000
)
)
if
(!
AutoInOutTest
&&
IOMonitor
.
IODebound
(
SIO_Type
.
Door_Tray_Check
,
Config
,
IO_VALUE
.
HIGH
,
1000
)
)
...
@@ -76,10 +120,16 @@ namespace DeviceLibrary
...
@@ -76,10 +120,16 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
"Res0156"
,
"服务器连接异常"
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
"Res0156"
,
"服务器连接异常"
),
MsgLevel
.
warning
);
return
;
return
;
}
}
SRec
.
info
(
CID
,
MachineSide
==
MachineSideE
.
Left
?
"A侧"
:
"B侧"
,
"开始入库"
,
StoreMoveInfo
.
MoveParam
.
PosID
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn02
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn02
);
break
;
break
;
case
MoveStep
.
StoreIn02
:
case
MoveStep
.
StoreIn02
:
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
var
ac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
var
ac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
if
(
ac
==
null
)
{
StoreMoveInfo
.
log
(
$
"找不到库位:"
+
StoreMoveInfo
.
MoveParam
.
PosID
);
}
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
ac
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
ac
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
break
;
break
;
...
@@ -104,6 +154,7 @@ namespace DeviceLibrary
...
@@ -104,6 +154,7 @@ namespace DeviceLibrary
}
}
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
OutStoreJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
}
}
else
else
{
{
...
@@ -113,8 +164,11 @@ namespace DeviceLibrary
...
@@ -113,8 +164,11 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn05
:
case
MoveStep
.
StoreIn05
:
if
(
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsComplateOrFree
)
{
{
SRec
.
info
(
CID
,
MachineSide
==
MachineSideE
.
Left
?
"A侧"
:
"B侧"
,
"完成入库"
,
StoreMoveInfo
.
MoveParam
.
PosID
);
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
StoreMoveInfo
.
EndMove
();
StoreMoveInfo
.
EndMove
();
OutStoreJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
}
}
break
;
break
;
case
MoveStep
.
StoreOut10
:
case
MoveStep
.
StoreOut10
:
...
@@ -128,6 +182,7 @@ namespace DeviceLibrary
...
@@ -128,6 +182,7 @@ namespace DeviceLibrary
BoxStorePosition
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
);
BoxStorePosition
outTo
=
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
StoreMoveInfo
.
MoveParam
);
boxTransport
.
Start
(
outFrom
==
null
?
null
:
new
BoxStorePosition
(
Config
,
outFrom
,
StoreMoveInfo
.
MoveParam
),
outTo
,
StoreMoveType
.
OutStore
);
boxTransport
.
Start
(
outFrom
==
null
?
null
:
new
BoxStorePosition
(
Config
,
outFrom
,
StoreMoveInfo
.
MoveParam
),
outTo
,
StoreMoveType
.
OutStore
);
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
SRec
.
info
(
CID
,
MachineSide
==
MachineSideE
.
Left
?
"A侧"
:
"B侧"
,
"开始出库"
,
StoreMoveInfo
.
MoveParam
.
PosID
);
break
;
break
;
case
MoveStep
.
StoreOut11
:
case
MoveStep
.
StoreOut11
:
...
@@ -162,23 +217,36 @@ namespace DeviceLibrary
...
@@ -162,23 +217,36 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
"Res0156"
,
"服务器连接异常"
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
"Res0156"
,
"服务器连接异常"
),
MsgLevel
.
warning
);
return
;
return
;
}
}
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut
13
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut
_WaitMT
);
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
StoreMoveInfo
.
log
(
$
"料盘已到达目的地"
);
OutStoreJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
OutStoreJobList
.
ClearLastPosid
(
StoreMoveInfo
.
MoveParam
.
PosID
);
}
}
break
;
break
;
case
MoveStep
.
StoreOut13
:
case
MoveStep
.
StoreOut_WaitMT
:
if
(
IOMonitor
.
IODebound
(
SIO_Type
.
Door_Tray_Check
,
Config
,
IO_VALUE
.
LOW
,
1000
))
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut_WaitMT
);
{
if
(
SendTrayRequest
(
TrayTypeE
.
MTP2
.
ToString
(),
StoreMoveInfo
.
MoveParam
)
>
RemoteResult
.
Timeout
)
{
StoreMoveInfo
.
log
(
$
"料盘已被取走"
);
SRec
.
info
(
CID
,
MachineSide
==
MachineSideE
.
Left
?
"A侧"
:
"B侧"
,
"完成出库"
,
StoreMoveInfo
.
MoveParam
.
PosID
);
StoreMoveInfo
.
EndMove
();
StoreMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0161"
,
"等聊单料门料盘被取走"
),
MsgLevel
.
warning
));
}
}
else
if
(
StoreMoveInfo
.
IsTimeOut
(
30
))
else
{
StoreMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
"请求环形线空托盘失败"
,
MsgLevel
.
warning
));
}
StoreMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
break
;
case
MoveStep
.
StoreOut14
:
Msg
.
add
(
"等待环形线取走料盘"
,
MsgLevel
.
warning
);
if
(
IOValue
(
SIO_Type
.
Door_Tray_Check
,
Config
).
Equals
(
IO_VALUE
.
LOW
))
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0161"
,
"等聊单料门料盘被取走"
),
MsgLevel
.
alarm
);
if
(
IsLineFree
()
==
RemoteResult
.
True
)
{
StoreMoveInfo
.
log
(
$
"料盘已被取走"
);
StoreMoveInfo
.
EndMove
();
}
}
}
else
Msg
.
add
(
crc
.
GetString
(
"Res0161"
,
"等聊单料门料盘被取走"
),
MsgLevel
.
info
);
break
;
break
;
default
:
default
:
StoreMoveInfo
.
log
(
$
"未找到对应步骤:{StoreMoveInfo.MoveStep}"
);
StoreMoveInfo
.
log
(
$
"未找到对应步骤:{StoreMoveInfo.MoveStep}"
);
...
...
LoadCVSLibrary/Config/Config - 复制(2).csv
deleted
100644 → 0
查看文件 @
ad0410c
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,右仓旋转机构,R_Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,右仓升降机构,R_UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓进出机构,R_InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓压紧机构,R_Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,左仓旋转机构,L_Middle_Axis,4,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,左仓升降机构,L_UpDown_Axis,5,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓进出机构,L_InOut_Axis,6,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓压紧机构,L_Comp_Axis,7,HC,,40000,0,0,0,30000,0,10,700,0,0
,,,,,,,,,,,,,,,,
PRO,50,IO信号超时时间(秒),IOSingle_TimerOut,5,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,10,旋转机构待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,10,旋转机构单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,11,升降轴单料口门口P3,UpDown_P3,1015409,,,280000,,,,,,,,,
PRO,11,升降轴料串放料高点P3,UpDown_P4,682777,,,280000,,,,,,,,,
PRO,11,升降轴料串放料低点P4,UpDown_P5,659963,,,280000,,,,,,,,,
PRO,11,升降轴每毫米脉冲,UpDown_PoToMM,1000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,12,进出机构待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,12,进出机构单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
PRO,12,进出机构料串放料P3,InOut_P3,234184,,,500000,,,,,,,,,
PRO,12,进出机构13寸单料口P2,InOut_P4,234184,,,500000,,,,,,,,,
PRO,12,进出机构13寸料串放料P3,InOut_P5,234184,,,500000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,13,压紧机构待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,13,压紧机构8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,13,压紧机构每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,13,压紧机构库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
PRO,13,压紧机构压紧点偏移mm,Comp_PL_MM,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,HC,X00,X00,急停,SuddenStop_BTN,,,,,,,
DI,0,复位,Reset_BTN,1,HC,X01,X01,复位,Reset_BTN,,,,,,,
DI,0,自动启动,AutoRun_Single,2,HC,X02,X02,R进料口物料检测,R_Door_Tray_Check,,,,,,,
DI,0,气压检测,Airpressure_Check,3,HC,X03,X03,R料叉物料检测,R_TrayCheck_Fixture,,,,,,,
DI,0,安全光栅,SafetyLightCurtains,4,HC,X04,X04,R进料口门上升端,R_Door_Open,,,,,,,
DI,0,左侧防护门关闭,LeftDoorClose_Check,5,HC,X05,X05,R进料口门下降端,R_Door_Close,,,,,,,
DI,0,右侧防护门关闭,RightDoorClose_Check,6,HC,X06,X06,R激光对点检测,R_Laser_Location,,,,,,,
DI,0,上料机构门关闭,DoorClose_LoadMaterial,7,HC,X07,X07,后门门禁,,,,,,,,
DI,0,单料口门上升端,NGDoor_Open,8,HC,X08,X08,L进料口物料检测,L_Door_Tray_Check,,,,,,,
DI,0,单料口门下降端,NGDoor_Close,9,HC,X09,X09,L料叉物料检测,L_TrayCheck_Fixture,,,,,,,
DI,0,上料机构左门锁打开端,BatchDoor_Open,10,HC,X10,X10,L进料口门上升端,L_Door_Open,,,,,,,
DI,0,上料机构左门锁关闭端,BatchDoor_Close,11,HC,X11,X11,L进料口门下降端,L_Door_Close,,,,,,,
DI,0,上料机构右门锁打开端,BatchDoor_Open2,12,HC,X12,X12,L激光对点检测,L_Laser_Location,,,,,,,
DI,0,上料机构右门锁关闭端,BatchDoor_Close2,13,HC,X13,,,,,,,,,,
DI,0,抓取气缸上升端,ClampingDisc_Up,14,HC,X14,,,,,,,,,,
DI,0,抓取气缸下降端,ClampingDisc_Down,15,HC,X15,,,,,,,,,,
DI,0,夹爪气缸夹紧端,Clamping_Work,16,HC,X16,,,,,,,,,,
DI,0,夹爪气缸放松端,Clamping_Relax,17,HC,X17,,,,,,,,,,
DI,0,7寸料盘检测,WidthCheck_7,18,HC,X18,,,,,,,,,,
DI,0,13寸料盘检测,WidthCheck_13,19,HC,X19,,,,,,,,,,
DI,0,进出料口料盘检测,NGDoor_Tray_Check,20,HC,X20,,,,,,,,,,
DI,0,上料定位料盘检测,TrayCheck,21,HC,X21,,,,,,,,,,
DI,0,上料机构出料检测,OutCheck,22,HC,X22,,,,,,,,,,
DI,0,料叉机构料盘检测,TrayCheck_Fixture,23,HC,X23,,,,,,,,,,
DI,0,激光对位检测,Laser_Location,24,HC,X24,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,自动指示灯,Run_Led,0,HC,Y00,,,,,,,,,,
DO,0,故障指示灯,Alarm_Led,1,HC,Y01,,,,,,,,,,
DO,0,待机指示灯,Standby_Led,2,HC,Y02,,,,,,,,,,
DO,0,故障蜂鸣器,Alarm_Buzzer,3,HC,Y03,,,,,,,,,,
DO,0,设备照明,Device_Led,4,HC,Y04,,,,,,,,,,
DO,0,阀门开启,NitrogenValve,5,HC,Y05,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
LoadCVSLibrary/Config/Config_Left1.csv
deleted
100644 → 0
查看文件 @
ad0410c
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,右仓旋转机构,R_Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,右仓升降机构,R_UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓进出机构,R_InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓压紧机构,R_Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,左仓旋转机构,L_Middle_Axis,4,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,左仓升降机构,L_UpDown_Axis,5,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓进出机构,L_InOut_Axis,6,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓压紧机构,L_Comp_Axis,7,HC,,40000,0,0,0,30000,0,10,700,0,0
,,,,,,,,,,,,,,,,
PRO,50,IO信号超时时间(秒),IOSingle_TimerOut,5,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,10,旋转机构待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,10,旋转机构单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,11,升降轴单料口门口P3,UpDown_P3,1015409,,,280000,,,,,,,,,
PRO,11,升降轴料串放料高点P3,UpDown_P4,682777,,,280000,,,,,,,,,
PRO,11,升降轴料串放料低点P4,UpDown_P5,659963,,,280000,,,,,,,,,
PRO,11,升降轴每毫米脉冲,UpDown_PoToMM,1000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,12,进出机构待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,12,进出机构单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
PRO,12,进出机构料串放料P3,InOut_P3,234184,,,500000,,,,,,,,,
PRO,12,进出机构13寸单料口P2,InOut_P4,234184,,,500000,,,,,,,,,
PRO,12,进出机构13寸料串放料P3,InOut_P5,234184,,,500000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,13,压紧机构待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,13,压紧机构8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,13,压紧机构每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,13,压紧机构库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
PRO,13,压紧机构压紧点偏移mm,Comp_PL_MM,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,HC,X00,X00,急停,SuddenStop_BTN,,,,,,,
DI,0,复位,Reset_BTN,1,HC,X01,X01,复位,Reset_BTN,,,,,,,
DI,0,自动启动,AutoRun_Single,2,HC,X02,X02,R进料口物料检测,R_Door_Tray_Check,,,,,,,
DI,0,气压检测,Airpressure_Check,3,HC,X03,X03,R料叉物料检测,R_TrayCheck_Fixture,,,,,,,
DI,0,安全光栅,SafetyLightCurtains,4,HC,X04,X04,R进料口门上升端,R_Door_Open,,,,,,,
DI,0,左侧防护门关闭,LeftDoorClose_Check,5,HC,X05,X05,R进料口门下降端,R_Door_Close,,,,,,,
DI,0,右侧防护门关闭,RightDoorClose_Check,6,HC,X06,X06,R激光对点检测,R_Laser_Location,,,,,,,
DI,0,上料机构门关闭,DoorClose_LoadMaterial,7,HC,X07,X07,后门门禁,,,,,,,,
DI,0,单料口门上升端,NGDoor_Open,8,HC,X08,X08,L进料口物料检测,L_Door_Tray_Check,,,,,,,
DI,0,单料口门下降端,NGDoor_Close,9,HC,X09,X09,L料叉物料检测,L_TrayCheck_Fixture,,,,,,,
DI,0,上料机构左门锁打开端,BatchDoor_Open,10,HC,X10,X10,L进料口门上升端,L_Door_Open,,,,,,,
DI,0,上料机构左门锁关闭端,BatchDoor_Close,11,HC,X11,X11,L进料口门下降端,L_Door_Close,,,,,,,
DI,0,上料机构右门锁打开端,BatchDoor_Open2,12,HC,X12,X12,L激光对点检测,L_Laser_Location,,,,,,,
DI,0,上料机构右门锁关闭端,BatchDoor_Close2,13,HC,X13,,,,,,,,,,
DI,0,抓取气缸上升端,ClampingDisc_Up,14,HC,X14,,,,,,,,,,
DI,0,抓取气缸下降端,ClampingDisc_Down,15,HC,X15,,,,,,,,,,
DI,0,夹爪气缸夹紧端,Clamping_Work,16,HC,X16,,,,,,,,,,
DI,0,夹爪气缸放松端,Clamping_Relax,17,HC,X17,,,,,,,,,,
DI,0,7寸料盘检测,WidthCheck_7,18,HC,X18,,,,,,,,,,
DI,0,13寸料盘检测,WidthCheck_13,19,HC,X19,,,,,,,,,,
DI,0,进出料口料盘检测,NGDoor_Tray_Check,20,HC,X20,,,,,,,,,,
DI,0,上料定位料盘检测,TrayCheck,21,HC,X21,,,,,,,,,,
DI,0,上料机构出料检测,OutCheck,22,HC,X22,,,,,,,,,,
DI,0,料叉机构料盘检测,TrayCheck_Fixture,23,HC,X23,,,,,,,,,,
DI,0,激光对位检测,Laser_Location,24,HC,X24,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,自动指示灯,Run_Led,0,HC,Y00,,,,,,,,,,
DO,0,故障指示灯,Alarm_Led,1,HC,Y01,,,,,,,,,,
DO,0,待机指示灯,Standby_Led,2,HC,Y02,,,,,,,,,,
DO,0,故障蜂鸣器,Alarm_Buzzer,3,HC,Y03,,,,,,,,,,
DO,0,设备照明,Device_Led,4,HC,Y04,,,,,,,,,,
DO,0,阀门开启,NitrogenValve,5,HC,Y05,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
LoadCVSLibrary/Config/Left/Config.csv
查看文件 @
10fea4c
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,左仓旋转
机构
,Middle_Axis,5,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,左仓旋转
轴
,Middle_Axis,5,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,左仓升降
机构
,UpDown_Axis,6,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓升降
轴
,UpDown_Axis,6,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓进出
机构
,InOut_Axis,7,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓进出
轴
,InOut_Axis,7,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,左仓压紧
机构
,Comp_Axis,8,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,左仓压紧
轴
,Comp_Axis,8,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,左仓单料门电机,Door_Axis,9,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,左仓单料门电机,Door_Axis,9,HC,,40000,0,0,0,30000,0,10,700,0,0
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,15,旋转
机构
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,15,旋转
轴
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,15,旋转
机构
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
PRO,15,旋转
轴
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,16,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,16,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,16,升降轴单料口高点P2,UpDown_P2,1015409,,,280000,,,,,,,,,
PRO,16,升降轴单料口高点P2,UpDown_P2,1015409,,,280000,,,,,,,,,
PRO,16,升降轴单料口低点P3,UpDown_P3,682777,,,280000,,,,,,,,,
PRO,16,升降轴单料口低点P3,UpDown_P3,682777,,,280000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,17,进出
机构
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,17,进出
轴
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,17,进出
机构
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
PRO,17,进出
轴
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,18,压紧
机构
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,18,压紧
轴
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,18,压紧
机构
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,18,压紧
轴
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,18,压紧
机构
每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,18,压紧
轴
每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,18,压紧
机构
库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
PRO,18,压紧
轴
库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,19,舱门升降幅度,DoorAxis_Run_Len,500000,,,50000,,,,,,,,,
PRO,19,舱门升降幅度,DoorAxis_Run_Len,500000,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
...
...
LoadCVSLibrary/Config/Right/Config.csv
查看文件 @
10fea4c
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,右仓旋转
机构
,Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,右仓旋转
轴
,Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,右仓升降
机构
,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓升降
轴
,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓进出
机构
,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓进出
轴
,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,右仓压紧
机构
,Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,右仓压紧
轴
,Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,右仓单料门电机,Door_Axis,4,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,右仓单料门电机,Door_Axis,4,HC,,40000,0,0,0,30000,0,10,700,0,0
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,10,旋转
机构
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,10,旋转
轴
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,10,旋转
机构
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
PRO,10,旋转
轴
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,11,升降轴单料口高点P2,UpDown_P2,1015409,,,280000,,,,,,,,,
PRO,11,升降轴单料口高点P2,UpDown_P2,1015409,,,280000,,,,,,,,,
PRO,11,升降轴单料口低点P3,UpDown_P3,682777,,,280000,,,,,,,,,
PRO,11,升降轴单料口低点P3,UpDown_P3,682777,,,280000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,12,进出
机构
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,12,进出
轴
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,12,进出
机构
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
PRO,12,进出
轴
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,13,压紧
机构
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,13,压紧
轴
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,13,压紧
机构
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,13,压紧
轴
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,13,压紧
机构
每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,13,压紧
轴
每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,13,压紧
机构
库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
PRO,13,压紧
轴
库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,14,舱门升降幅度,DoorAxis_Run_Len,500000,,,50000,,,,,,,,,
PRO,14,舱门升降幅度,DoorAxis_Run_Len,500000,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
...
...
LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
10fea4c
...
@@ -87,12 +87,6 @@
...
@@ -87,12 +87,6 @@
</Content>
</Content>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Content Include="Config\Config - 复制%282%29.csv" />
</ItemGroup>
<ItemGroup>
<Content Include="Config\Config_Left1.csv" />
</ItemGroup>
<ItemGroup>
<Content Include="Config\Left\Config.csv">
<Content Include="Config\Left\Config.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</Content>
...
...
LoadCVSLibrary/storeConfig/config/Store_ConfigBase.cs
查看文件 @
10fea4c
...
@@ -10,22 +10,22 @@
...
@@ -10,22 +10,22 @@
{
{
}
}
/// <summary>
/// <summary>
/// AXIS,,右仓旋转
机构
,Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
/// AXIS,,右仓旋转
轴
,Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Middle_Axis"
)]
[
ConfigProAttribute
(
"Middle_Axis"
)]
public
ConfigMoveAxis
Middle_Axis
{
get
;
set
;
}
public
ConfigMoveAxis
Middle_Axis
{
get
;
set
;
}
/// <summary>
/// <summary>
/// AXIS,,右仓升降
机构
,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
/// AXIS,,右仓升降
轴
,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"UpDown_Axis"
)]
[
ConfigProAttribute
(
"UpDown_Axis"
)]
public
ConfigMoveAxis
UpDown_Axis
{
get
;
set
;
}
public
ConfigMoveAxis
UpDown_Axis
{
get
;
set
;
}
/// <summary>
/// <summary>
/// AXIS,,右仓进出
机构
,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
/// AXIS,,右仓进出
轴
,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"InOut_Axis"
)]
[
ConfigProAttribute
(
"InOut_Axis"
)]
public
ConfigMoveAxis
InOut_Axis
{
get
;
set
;
}
public
ConfigMoveAxis
InOut_Axis
{
get
;
set
;
}
/// <summary>
/// <summary>
/// AXIS,,右仓压紧
机构
,Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
/// AXIS,,右仓压紧
轴
,Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_Axis"
)]
[
ConfigProAttribute
(
"Comp_Axis"
)]
public
ConfigMoveAxis
Comp_Axis
{
get
;
set
;
}
public
ConfigMoveAxis
Comp_Axis
{
get
;
set
;
}
...
@@ -35,12 +35,12 @@
...
@@ -35,12 +35,12 @@
[
ConfigProAttribute
(
"Door_Axis"
)]
[
ConfigProAttribute
(
"Door_Axis"
)]
public
ConfigMoveAxis
Door_Axis
{
get
;
set
;
}
public
ConfigMoveAxis
Door_Axis
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,10,旋转
机构
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
/// PRO,10,旋转
轴
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Middle_P1"
)]
[
ConfigProAttribute
(
"Middle_P1"
)]
public
int
Middle_P1
{
get
;
set
;
}
public
int
Middle_P1
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,10,旋转
机构
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
/// PRO,10,旋转
轴
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Middle_P2"
)]
[
ConfigProAttribute
(
"Middle_P2"
)]
public
int
Middle_P2
{
get
;
set
;
}
public
int
Middle_P2
{
get
;
set
;
}
...
@@ -60,43 +60,43 @@
...
@@ -60,43 +60,43 @@
[
ConfigProAttribute
(
"UpDown_P3"
)]
[
ConfigProAttribute
(
"UpDown_P3"
)]
public
int
UpDown_P3
{
get
;
set
;
}
public
int
UpDown_P3
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,12,进出
机构
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
/// PRO,12,进出
轴
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"InOut_P1"
)]
[
ConfigProAttribute
(
"InOut_P1"
)]
public
int
InOut_P1
{
get
;
set
;
}
public
int
InOut_P1
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,12,进出
机构
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
/// PRO,12,进出
轴
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"InOut_P2"
)]
[
ConfigProAttribute
(
"InOut_P2"
)]
public
int
InOut_P2
{
get
;
set
;
}
public
int
InOut_P2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,13,压紧
机构
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
/// PRO,13,压紧
轴
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_P1"
)]
[
ConfigProAttribute
(
"Comp_P1"
)]
public
int
Comp_P1
{
get
;
set
;
}
public
int
Comp_P1
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,13,压紧
机构
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
/// PRO,13,压紧
轴
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_P2"
)]
[
ConfigProAttribute
(
"Comp_P2"
)]
public
int
Comp_P2
{
get
;
set
;
}
public
int
Comp_P2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,13,压紧
机构
每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
/// PRO,13,压紧
轴
每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_PoToMM"
)]
[
ConfigProAttribute
(
"Comp_PoToMM"
)]
public
int
Comp_PoToMM
{
get
;
set
;
}
public
int
Comp_PoToMM
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,13,压紧
机构
库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
/// PRO,13,压紧
轴
库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_PH_MM"
)]
[
ConfigProAttribute
(
"Comp_PH_MM"
)]
public
int
Comp_PH_MM
{
get
;
set
;
}
public
int
Comp_PH_MM
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,10,旋转
机构
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
/// PRO,10,旋转
轴
待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Middle_P1_speed"
)]
[
ConfigProAttribute
(
"Middle_P1_speed"
)]
public
int
Middle_P1_speed
{
get
;
set
;
}
public
int
Middle_P1_speed
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,10,旋转
机构
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
/// PRO,10,旋转
轴
单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Middle_P2_speed"
)]
[
ConfigProAttribute
(
"Middle_P2_speed"
)]
public
int
Middle_P2_speed
{
get
;
set
;
}
public
int
Middle_P2_speed
{
get
;
set
;
}
...
@@ -116,22 +116,22 @@
...
@@ -116,22 +116,22 @@
[
ConfigProAttribute
(
"UpDown_P3_speed"
)]
[
ConfigProAttribute
(
"UpDown_P3_speed"
)]
public
int
UpDown_P3_speed
{
get
;
set
;
}
public
int
UpDown_P3_speed
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,12,进出
机构
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
/// PRO,12,进出
轴
待机点P1,InOut_P1,0,,,500000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"InOut_P1_speed"
)]
[
ConfigProAttribute
(
"InOut_P1_speed"
)]
public
int
InOut_P1_speed
{
get
;
set
;
}
public
int
InOut_P1_speed
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,12,进出
机构
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
/// PRO,12,进出
轴
单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"InOut_P2_speed"
)]
[
ConfigProAttribute
(
"InOut_P2_speed"
)]
public
int
InOut_P2_speed
{
get
;
set
;
}
public
int
InOut_P2_speed
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,13,压紧
机构
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
/// PRO,13,压紧
轴
待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_P1_speed"
)]
[
ConfigProAttribute
(
"Comp_P1_speed"
)]
public
int
Comp_P1_speed
{
get
;
set
;
}
public
int
Comp_P1_speed
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,13,压紧
机构
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
/// PRO,13,压紧
轴
8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"Comp_P2_speed"
)]
[
ConfigProAttribute
(
"Comp_P2_speed"
)]
public
int
Comp_P2_speed
{
get
;
set
;
}
public
int
Comp_P2_speed
{
get
;
set
;
}
...
...
TheMachine/App.config
查看文件 @
10fea4c
...
@@ -39,6 +39,16 @@
...
@@ -39,6 +39,16 @@
<
conversionPattern
value
=
"%m%n"
/>
<
conversionPattern
value
=
"%m%n"
/>
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"SLog"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/SLog.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"ALL"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
@@ -51,6 +61,10 @@
...
@@ -51,6 +61,10 @@
<
level
value
=
"ALL"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"LngResource"
/>
<
appender
-
ref
ref
=
"LngResource"
/>
</
logger
>
</
logger
>
<
logger
name
=
"SLog"
additivity
=
"false"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"SLog"
/>
</
logger
>
<!--<
root
>
<!--<
root
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
TheMachine/Common.cs
查看文件 @
10fea4c
...
@@ -33,7 +33,7 @@ namespace TheMachine
...
@@ -33,7 +33,7 @@ namespace TheMachine
stateViewL
.
Columns
.
Add
(
c2
);
stateViewL
.
Columns
.
Add
(
c2
);
stateViewL
.
Columns
.
Add
(
c3
);
stateViewL
.
Columns
.
Add
(
c3
);
stateViewL
.
Columns
.
Add
(
c4
);
stateViewL
.
Columns
.
Add
(
c4
);
stateViewL
.
ColumnWidthChanging
+=
StateViewL_ColumnWidthChanging
;
;
//
stateViewL.ColumnWidthChanging += StateViewL_ColumnWidthChanging; ;
}
}
public
static
void
AlertListViewSet
(
ListView
listViewL
)
public
static
void
AlertListViewSet
(
ListView
listViewL
)
{
{
...
@@ -50,7 +50,7 @@ namespace TheMachine
...
@@ -50,7 +50,7 @@ namespace TheMachine
listViewL
.
Columns
.
Add
(
emptycol
);
listViewL
.
Columns
.
Add
(
emptycol
);
listViewL
.
Columns
.
Add
(
timecol
);
listViewL
.
Columns
.
Add
(
timecol
);
listViewL
.
Columns
.
Add
(
msgcol
);
listViewL
.
Columns
.
Add
(
msgcol
);
listViewL
.
ColumnWidthChanging
+=
StateViewL_ColumnWidthChanging
;
//
listViewL.ColumnWidthChanging += StateViewL_ColumnWidthChanging;
}
}
private
static
void
StateViewL_ColumnWidthChanging
(
object
sender
,
ColumnWidthChangingEventArgs
e
)
private
static
void
StateViewL_ColumnWidthChanging
(
object
sender
,
ColumnWidthChangingEventArgs
e
)
{
{
...
...
TheMachine/Form1.Designer.cs
查看文件 @
10fea4c
...
@@ -29,6 +29,7 @@ namespace TheMachine
...
@@ -29,6 +29,7 @@ namespace TheMachine
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
Form1
));
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
设备操作
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
设备操作
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
启用调试模式
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
启用调试模式
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
@@ -38,7 +39,6 @@ namespace TheMachine
...
@@ -38,7 +39,6 @@ namespace TheMachine
this
.
退出
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
退出
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
语言
toolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
语言
toolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
简体中文
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
简体中文
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
日本语
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
englishToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
englishToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
关于
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
关于
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
tabc
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabc
=
new
System
.
Windows
.
Forms
.
TabControl
();
...
@@ -106,12 +106,14 @@ namespace TheMachine
...
@@ -106,12 +106,14 @@ namespace TheMachine
this
.
启用调试模式
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
启用调试模式
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
启用调试模式
ToolStripMenuItem
.
Tag
=
"not"
;
this
.
启用调试模式
ToolStripMenuItem
.
Tag
=
"not"
;
this
.
启用调试模式
ToolStripMenuItem
.
Text
=
"启用配置模式"
;
this
.
启用调试模式
ToolStripMenuItem
.
Text
=
"启用配置模式"
;
this
.
启用调试模式
ToolStripMenuItem
.
Visible
=
false
;
this
.
启用调试模式
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用调试模式
ToolStripMenuItem_Click
);
this
.
启用调试模式
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用调试模式
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator4
// toolStripSeparator4
//
//
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
6
);
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
6
);
this
.
toolStripSeparator4
.
Visible
=
false
;
//
//
// 二维码识别调试ToolStripMenuItem
// 二维码识别调试ToolStripMenuItem
//
//
...
@@ -136,7 +138,6 @@ namespace TheMachine
...
@@ -136,7 +138,6 @@ namespace TheMachine
//
//
this
.
语言
toolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
语言
toolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
简体中文
ToolStripMenuItem
,
this
.
简体中文
ToolStripMenuItem
,
this
.
日本语
ToolStripMenuItem
,
this
.
englishToolStripMenuItem
});
this
.
englishToolStripMenuItem
});
this
.
语言
toolStripMenuItem
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
);
this
.
语言
toolStripMenuItem
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
12F
);
this
.
语言
toolStripMenuItem
.
Name
=
"语言toolStripMenuItem"
;
this
.
语言
toolStripMenuItem
.
Name
=
"语言toolStripMenuItem"
;
...
@@ -151,14 +152,6 @@ namespace TheMachine
...
@@ -151,14 +152,6 @@ namespace TheMachine
this
.
简体中文
ToolStripMenuItem
.
Text
=
"简体中文"
;
this
.
简体中文
ToolStripMenuItem
.
Text
=
"简体中文"
;
this
.
简体中文
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
简体中文
ToolStripMenuItem_Click
);
this
.
简体中文
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
简体中文
ToolStripMenuItem_Click
);
//
//
// 日本语ToolStripMenuItem
//
this
.
日本语
ToolStripMenuItem
.
Name
=
"日本语ToolStripMenuItem"
;
this
.
日本语
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
144
,
26
);
this
.
日本语
ToolStripMenuItem
.
Tag
=
"not"
;
this
.
日本语
ToolStripMenuItem
.
Text
=
"日本語"
;
this
.
日本语
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
日本语
ToolStripMenuItem_Click
);
//
// englishToolStripMenuItem
// englishToolStripMenuItem
//
//
this
.
englishToolStripMenuItem
.
Name
=
"englishToolStripMenuItem"
;
this
.
englishToolStripMenuItem
.
Name
=
"englishToolStripMenuItem"
;
...
@@ -235,16 +228,16 @@ namespace TheMachine
...
@@ -235,16 +228,16 @@ namespace TheMachine
this
.
listViewR
.
MultiSelect
=
false
;
this
.
listViewR
.
MultiSelect
=
false
;
this
.
listViewR
.
Name
=
"listViewR"
;
this
.
listViewR
.
Name
=
"listViewR"
;
this
.
listViewR
.
ShowGroups
=
false
;
this
.
listViewR
.
ShowGroups
=
false
;
this
.
listViewR
.
Size
=
new
System
.
Drawing
.
Size
(
468
,
1
36
);
this
.
listViewR
.
Size
=
new
System
.
Drawing
.
Size
(
468
,
1
93
);
this
.
listViewR
.
TabIndex
=
2
;
this
.
listViewR
.
TabIndex
=
2
;
this
.
listViewR
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listViewR
.
UseCompatibleStateImageBehavior
=
false
;
//
//
// groupBox2
// groupBox2
//
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
stateViewR
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
stateViewR
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
163
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
220
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
469
,
140
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
469
,
224
);
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"运行步骤"
;
this
.
groupBox2
.
Text
=
"运行步骤"
;
...
@@ -258,16 +251,16 @@ namespace TheMachine
...
@@ -258,16 +251,16 @@ namespace TheMachine
this
.
stateViewR
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
25
);
this
.
stateViewR
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
25
);
this
.
stateViewR
.
MultiSelect
=
false
;
this
.
stateViewR
.
MultiSelect
=
false
;
this
.
stateViewR
.
Name
=
"stateViewR"
;
this
.
stateViewR
.
Name
=
"stateViewR"
;
this
.
stateViewR
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
1
12
);
this
.
stateViewR
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
1
96
);
this
.
stateViewR
.
TabIndex
=
0
;
this
.
stateViewR
.
TabIndex
=
0
;
this
.
stateViewR
.
UseCompatibleStateImageBehavior
=
false
;
this
.
stateViewR
.
UseCompatibleStateImageBehavior
=
false
;
//
//
// pictureBox2
// pictureBox2
//
//
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
309
);
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
453
);
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
271
);
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
127
);
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
;
...
@@ -298,16 +291,16 @@ namespace TheMachine
...
@@ -298,16 +291,16 @@ namespace TheMachine
this
.
listViewL
.
MultiSelect
=
false
;
this
.
listViewL
.
MultiSelect
=
false
;
this
.
listViewL
.
Name
=
"listViewL"
;
this
.
listViewL
.
Name
=
"listViewL"
;
this
.
listViewL
.
ShowGroups
=
false
;
this
.
listViewL
.
ShowGroups
=
false
;
this
.
listViewL
.
Size
=
new
System
.
Drawing
.
Size
(
468
,
1
36
);
this
.
listViewL
.
Size
=
new
System
.
Drawing
.
Size
(
468
,
1
93
);
this
.
listViewL
.
TabIndex
=
2
;
this
.
listViewL
.
TabIndex
=
2
;
this
.
listViewL
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listViewL
.
UseCompatibleStateImageBehavior
=
false
;
//
//
// groupBox1
// groupBox1
//
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
stateViewL
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
stateViewL
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
163
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
220
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
469
,
140
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
469
,
227
);
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabIndex
=
1
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"运行步骤"
;
this
.
groupBox1
.
Text
=
"运行步骤"
;
...
@@ -321,16 +314,16 @@ namespace TheMachine
...
@@ -321,16 +314,16 @@ namespace TheMachine
this
.
stateViewL
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
25
);
this
.
stateViewL
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
25
);
this
.
stateViewL
.
MultiSelect
=
false
;
this
.
stateViewL
.
MultiSelect
=
false
;
this
.
stateViewL
.
Name
=
"stateViewL"
;
this
.
stateViewL
.
Name
=
"stateViewL"
;
this
.
stateViewL
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
1
12
);
this
.
stateViewL
.
Size
=
new
System
.
Drawing
.
Size
(
463
,
1
99
);
this
.
stateViewL
.
TabIndex
=
0
;
this
.
stateViewL
.
TabIndex
=
0
;
this
.
stateViewL
.
UseCompatibleStateImageBehavior
=
false
;
this
.
stateViewL
.
UseCompatibleStateImageBehavior
=
false
;
//
//
// pictureBox1
// pictureBox1
//
//
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
309
);
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
453
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
466
,
271
);
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
466
,
127
);
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
;
...
@@ -402,7 +395,7 @@ namespace TheMachine
...
@@ -402,7 +395,7 @@ namespace TheMachine
this
.
btn_run
.
Name
=
"btn_run"
;
this
.
btn_run
.
Name
=
"btn_run"
;
this
.
btn_run
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
44
);
this
.
btn_run
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
44
);
this
.
btn_run
.
TabIndex
=
4
;
this
.
btn_run
.
TabIndex
=
4
;
this
.
btn_run
.
Tag
=
"
not
"
;
this
.
btn_run
.
Tag
=
""
;
this
.
btn_run
.
Text
=
"全部启动"
;
this
.
btn_run
.
Text
=
"全部启动"
;
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
this
.
btn_run
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_run_Click
);
this
.
btn_run
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_run_Click
);
...
@@ -417,6 +410,7 @@ namespace TheMachine
...
@@ -417,6 +410,7 @@ namespace TheMachine
this
.
Controls
.
Add
(
this
.
tabc
);
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
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
Name
=
"Form1"
;
this
.
Name
=
"Form1"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
Manual
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
Manual
;
...
@@ -466,7 +460,6 @@ namespace TheMachine
...
@@ -466,7 +460,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
Panel
pnl
;
private
System
.
Windows
.
Forms
.
Panel
pnl
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
语言
toolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
语言
toolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
简体中文
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
简体中文
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
日本语
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
englishToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
englishToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
GroupBox
gb_right
;
private
System
.
Windows
.
Forms
.
GroupBox
gb_right
;
private
System
.
Windows
.
Forms
.
ListView
listViewR
;
private
System
.
Windows
.
Forms
.
ListView
listViewR
;
...
...
TheMachine/Form1.cs
查看文件 @
10fea4c
...
@@ -83,6 +83,7 @@ namespace TheMachine
...
@@ -83,6 +83,7 @@ namespace TheMachine
//codeInfos.Add(new CodeInfo("", 564, 684));
//codeInfos.Add(new CodeInfo("", 564, 684));
btn_run
.
Enabled
=
false
;
btn_run
.
Enabled
=
false
;
//btn_run.Text = crc.GetString("Res0001","全部启动");
//btn_stop.Enabled = false;
//btn_stop.Enabled = false;
#
region
报警信息
listview
初始化
#
region
报警信息
listview
初始化
Common
.
AlertListViewSet
(
listViewL
);
Common
.
AlertListViewSet
(
listViewL
);
...
@@ -312,6 +313,17 @@ namespace TheMachine
...
@@ -312,6 +313,17 @@ namespace TheMachine
lm
.
Add
(
m
);
lm
.
Add
(
m
);
}
}
SetMsg
(
new
Dictionary
<
MachineSideE
,
List
<
Msg
>>()
{
{
MachineSideE
.
Left
,
lm
}
});
SetMsg
(
new
Dictionary
<
MachineSideE
,
List
<
Msg
>>()
{
{
MachineSideE
.
Left
,
lm
}
});
if
(!
RobotManage
.
IsConfigMode
)
{
Task
.
Run
(()
=>
{
this
.
Invoke
((
EventHandler
)
delegate
{
Task
.
Delay
(
1000
).
Wait
();
启用调试模式
ToolStripMenuItem_Click
(
启用调试模式
ToolStripMenuItem
,
EventArgs
.
Empty
);
});
});
}
}
}
void
SetMsg
(
Dictionary
<
MachineSideE
,
List
<
Msg
>>
msgss
)
void
SetMsg
(
Dictionary
<
MachineSideE
,
List
<
Msg
>>
msgss
)
{
{
...
@@ -494,7 +506,8 @@ namespace TheMachine
...
@@ -494,7 +506,8 @@ namespace TheMachine
private
void
btn_IgnoreX09_Click
(
object
sender
,
EventArgs
e
)
private
void
btn_IgnoreX09_Click
(
object
sender
,
EventArgs
e
)
{
{
//RobotManage.mainMachine.IgnoreX09();
RobotManage
.
leftMachine
.
IgnoreX09
();
RobotManage
.
rightMachine
.
IgnoreX09
();
btn_IgnoreX09
.
Visible
=
false
;
btn_IgnoreX09
.
Visible
=
false
;
}
}
...
@@ -514,6 +527,13 @@ namespace TheMachine
...
@@ -514,6 +527,13 @@ namespace TheMachine
stateViewL
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Res0186"
,
"步骤"
);
stateViewL
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Res0186"
,
"步骤"
);
stateViewL
.
Columns
[
3
].
Text
=
crc
.
GetString
(
"Form1_tabc_tabP1_Text"
,
"信息"
);
stateViewL
.
Columns
[
3
].
Text
=
crc
.
GetString
(
"Form1_tabc_tabP1_Text"
,
"信息"
);
listViewR
.
Columns
[
1
].
Text
=
crc
.
GetString
(
"Res0184"
,
"时间"
);
listViewR
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Form1_tabc_tabP1_Text"
,
"信息"
);
stateViewR
.
Columns
[
1
].
Text
=
crc
.
GetString
(
"Res0185"
,
"模块"
);
stateViewR
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"Res0186"
,
"步骤"
);
stateViewR
.
Columns
[
3
].
Text
=
crc
.
GetString
(
"Form1_tabc_tabP1_Text"
,
"信息"
);
启用调试模式
ToolStripMenuItem
.
Text
=
!
RobotManage
.
IsConfigMode
?
crc
.
GetString
(
"Res0180"
,
"启用配置模式"
)
:
crc
.
GetString
(
"Res0181"
,
"停用配置模式"
);
启用调试模式
ToolStripMenuItem
.
Text
=
!
RobotManage
.
IsConfigMode
?
crc
.
GetString
(
"Res0180"
,
"启用配置模式"
)
:
crc
.
GetString
(
"Res0181"
,
"停用配置模式"
);
}
}
...
...
TheMachine/Form1.resx
查看文件 @
10fea4c
此文件的差异太大,无法显示。
TheMachine/Properties/AssemblyInfo.cs
查看文件 @
10fea4c
...
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
...
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
// 与程序集关联的信息。
[assembly: AssemblyTitle("
DualSISO
")]
[assembly: AssemblyTitle("
SBDH
")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("上海挚锦科技有限公司")]
[assembly: AssemblyCompany("上海挚锦科技有限公司")]
[assembly: AssemblyProduct("
DualSISO
")]
[assembly: AssemblyProduct("
SBDH
")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyCulture("")]
...
...
TheMachine/SBDH.ico
0 → 100644
查看文件 @
10fea4c
此文件类型无法预览
TheMachine/SettingControl.cs
查看文件 @
10fea4c
...
@@ -32,6 +32,12 @@ namespace TheMachine
...
@@ -32,6 +32,12 @@ namespace TheMachine
}
}
this
.
cb_tempsensorport
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_tempsensorport_SelectedIndexChanged
);
this
.
cb_tempsensorport
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_tempsensorport_SelectedIndexChanged
);
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
crc
.
LanguageProcess
(
this
);
}
}
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
...
...
TheMachine/TheMachine.csproj
查看文件 @
10fea4c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<ProjectGuid>{61FDFF14-8BB7-439A-85A0-592E3011F4C4}</ProjectGuid>
<ProjectGuid>{61FDFF14-8BB7-439A-85A0-592E3011F4C4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace>
<RootNamespace>TheMachine</RootNamespace>
<AssemblyName>
DualSISO
</AssemblyName>
<AssemblyName>
SBDH
</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<WarningLevel>4</WarningLevel>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
icon
.ico</ApplicationIcon>
<ApplicationIcon>
SBDH
.ico</ApplicationIcon>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationManifest>app.manifest</ApplicationManifest>
...
@@ -75,99 +75,67 @@
...
@@ -75,99 +75,67 @@
</Reference>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="AboutBox1.cs">
<Compile Include="AboutBox1.cs" />
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutBox1.Designer.cs">
<Compile Include="AboutBox1.Designer.cs">
<DependentUpon>AboutBox1.cs</DependentUpon>
<DependentUpon>AboutBox1.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="AxisControl.cs">
<Compile Include="AxisControl.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="AxisControl.Designer.cs">
<Compile Include="AxisControl.Designer.cs">
<DependentUpon>AxisControl.cs</DependentUpon>
<DependentUpon>AxisControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Common.cs" />
<Compile Include="Common.cs" />
<Compile Include="Form1.cs">
<Compile Include="Form1.cs" />
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="StoreSettingControl.cs">
<Compile Include="StoreSettingControl.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="StoreSettingControl.Designer.cs">
<Compile Include="StoreSettingControl.Designer.cs">
<DependentUpon>StoreSettingControl.cs</DependentUpon>
<DependentUpon>StoreSettingControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="SIOControls.cs">
<Compile Include="SIOControls.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SIOControls.Designer.cs">
<Compile Include="SIOControls.Designer.cs">
<DependentUpon>SIOControls.cs</DependentUpon>
<DependentUpon>SIOControls.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="IOControls.cs">
<Compile Include="IOControls.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="IOControls.Designer.cs">
<Compile Include="IOControls.Designer.cs">
<DependentUpon>IOControls.cs</DependentUpon>
<DependentUpon>IOControls.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="LogControl.cs">
<Compile Include="LogControl.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="LogControl.Designer.cs">
<Compile Include="LogControl.Designer.cs">
<DependentUpon>LogControl.cs</DependentUpon>
<DependentUpon>LogControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="positionTool\FrmPositionTool.cs">
<Compile Include="positionTool\FrmPositionTool.cs" />
<SubType>Form</SubType>
</Compile>
<Compile Include="positionTool\FrmPositionTool.Designer.cs">
<Compile Include="positionTool\FrmPositionTool.Designer.cs">
<DependentUpon>FrmPositionTool.cs</DependentUpon>
<DependentUpon>FrmPositionTool.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingControl.cs">
<Compile Include="SettingControl.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SettingControl.Designer.cs">
<Compile Include="SettingControl.Designer.cs">
<DependentUpon>SettingControl.cs</DependentUpon>
<DependentUpon>SettingControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UCStoreMachine.cs">
<Compile Include="UCStoreMachine.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UCStoreMachine.Designer.cs">
<Compile Include="UCStoreMachine.Designer.cs">
<DependentUpon>UCStoreMachine.cs</DependentUpon>
<DependentUpon>UCStoreMachine.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\StorePosControl.cs">
<Compile Include="UC\StorePosControl.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\StorePosControl.designer.cs">
<Compile Include="UC\StorePosControl.designer.cs">
<DependentUpon>StorePosControl.cs</DependentUpon>
<DependentUpon>StorePosControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\ConfigControl.cs">
<Compile Include="UC\ConfigControl.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\ConfigControl.designer.cs">
<Compile Include="UC\ConfigControl.designer.cs">
<DependentUpon>ConfigControl.cs</DependentUpon>
<DependentUpon>ConfigControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\CylinderButton.cs">
<Compile Include="UC\CylinderButton.cs" />
<SubType>Component</SubType>
<Compile Include="UC\IOControl.cs" />
</Compile>
<Compile Include="UC\IOControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\IOControl.Designer.cs">
<Compile Include="UC\IOControl.Designer.cs">
<DependentUpon>IOControl.cs</DependentUpon>
<DependentUpon>IOControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\uc_boxdebug.cs">
<Compile Include="UC\uc_boxdebug.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\uc_boxdebug.Designer.cs">
<Compile Include="UC\uc_boxdebug.Designer.cs">
<DependentUpon>uc_boxdebug.cs</DependentUpon>
<DependentUpon>uc_boxdebug.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\UC_LedConfig.cs">
<Compile Include="UC\UC_LedConfig.cs" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UC_LedConfig.Designer.cs">
<Compile Include="UC\UC_LedConfig.Designer.cs">
<DependentUpon>UC_LedConfig.cs</DependentUpon>
<DependentUpon>UC_LedConfig.cs</DependentUpon>
</Compile>
</Compile>
...
@@ -257,6 +225,7 @@
...
@@ -257,6 +225,7 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
<Content Include="icon.ico" />
<Content Include="SBDH.ico" />
</ItemGroup>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PropertyGroup>
...
...
TheMachine/UC/UC_LedConfig.Designer.cs
查看文件 @
10fea4c
...
@@ -54,9 +54,9 @@ namespace TheMachine.UC
...
@@ -54,9 +54,9 @@ namespace TheMachine.UC
//
//
// button_reset
// button_reset
//
//
this
.
button_reset
.
Location
=
new
System
.
Drawing
.
Point
(
6
10
,
3
);
this
.
button_reset
.
Location
=
new
System
.
Drawing
.
Point
(
6
01
,
3
);
this
.
button_reset
.
Name
=
"button_reset"
;
this
.
button_reset
.
Name
=
"button_reset"
;
this
.
button_reset
.
Size
=
new
System
.
Drawing
.
Size
(
1
26
,
34
);
this
.
button_reset
.
Size
=
new
System
.
Drawing
.
Size
(
1
62
,
34
);
this
.
button_reset
.
TabIndex
=
1
;
this
.
button_reset
.
TabIndex
=
1
;
this
.
button_reset
.
Text
=
"重置为默认值"
;
this
.
button_reset
.
Text
=
"重置为默认值"
;
this
.
button_reset
.
UseVisualStyleBackColor
=
true
;
this
.
button_reset
.
UseVisualStyleBackColor
=
true
;
...
@@ -64,9 +64,9 @@ namespace TheMachine.UC
...
@@ -64,9 +64,9 @@ namespace TheMachine.UC
//
//
// button_save
// button_save
//
//
this
.
button_save
.
Location
=
new
System
.
Drawing
.
Point
(
6
10
,
72
);
this
.
button_save
.
Location
=
new
System
.
Drawing
.
Point
(
6
01
,
72
);
this
.
button_save
.
Name
=
"button_save"
;
this
.
button_save
.
Name
=
"button_save"
;
this
.
button_save
.
Size
=
new
System
.
Drawing
.
Size
(
1
26
,
34
);
this
.
button_save
.
Size
=
new
System
.
Drawing
.
Size
(
1
62
,
34
);
this
.
button_save
.
TabIndex
=
1
;
this
.
button_save
.
TabIndex
=
1
;
this
.
button_save
.
Text
=
"保存设定"
;
this
.
button_save
.
Text
=
"保存设定"
;
this
.
button_save
.
UseVisualStyleBackColor
=
true
;
this
.
button_save
.
UseVisualStyleBackColor
=
true
;
...
...
TheMachine/UC/UC_LedConfig.cs
查看文件 @
10fea4c
...
@@ -10,6 +10,7 @@ using System.Linq;
...
@@ -10,6 +10,7 @@ using System.Linq;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
OnlineStore.Common
;
namespace
TheMachine.UC
namespace
TheMachine.UC
{
{
...
@@ -21,12 +22,17 @@ namespace TheMachine.UC
...
@@ -21,12 +22,17 @@ namespace TheMachine.UC
InitializeComponent
();
InitializeComponent
();
this
.
Tag
=
"not"
;
this
.
Tag
=
"not"
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
CurrLanguage
=
Setting_Init
.
Device_Default_Language
;
crc
.
LanguageProcess
(
this
);
}
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
{
if
(
Config
==
null
)
if
(
Config
==
null
)
return
;
return
;
crc
.
CurrLanguage
=
Setting_Init
.
Device_Default_Language
;
crc
.
LanguageProcess
(
this
);
LoadLedList
();
LoadLedList
();
}
}
private
DeviceConfig
_Config
;
private
DeviceConfig
_Config
;
public
DeviceConfig
Config
public
DeviceConfig
Config
...
@@ -38,6 +44,7 @@ namespace TheMachine.UC
...
@@ -38,6 +44,7 @@ namespace TheMachine.UC
return
;
return
;
_Config
=
value
;
_Config
=
value
;
LoadLedList
();
LoadLedList
();
crc
.
LanguageProcess
(
this
);
}
}
}
}
...
...
TheMachine/UC/uc_boxdebug.cs
查看文件 @
10fea4c
...
@@ -150,8 +150,12 @@ namespace TheMachine
...
@@ -150,8 +150,12 @@ namespace TheMachine
if
(
int
.
TryParse
(
pb
[
1
],
out
_
))
if
(
int
.
TryParse
(
pb
[
1
],
out
_
))
pb
[
1
]
+=
"A"
;
pb
[
1
]
+=
"A"
;
var
pa1
=
pa
[
1
][
0
]
+
(
pa
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
);
var
pa1
=
"1"
;
var
pb1
=
pb
[
1
][
0
]
+
(
pb
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
);
if
(
pa
[
1
].
Length
>
1
)
pa1
=
pa
[
1
][
0
]
+
(
pa
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
);
var
pb1
=
"1"
;
if
(
pb
[
1
].
Length
>
1
)
pb1
=
pb
[
1
][
0
]
+
(
pb
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
);
var
pa2
=
pa
[
2
];
var
pa2
=
pa
[
2
];
var
pb2
=
pb
[
2
];
var
pb2
=
pb
[
2
];
...
@@ -343,14 +347,16 @@ namespace TheMachine
...
@@ -343,14 +347,16 @@ namespace TheMachine
if
(
Machine
.
runStatus
==
RunStatus
.
Running
)
if
(
Machine
.
runStatus
==
RunStatus
.
Running
)
{
{
string
selectPositionNum
=
cmbPosition
.
Text
;
int
posindex
=
Machine
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
ACStorePosition
ktkPosition
=
Machine
.
StorePosition
[
selectPositionNum
];
LogUtil
.
info
(
$
"入库位:{cmbPosition.Text},index:{posindex}"
);
JobInfo
jobInfo
=
new
JobInfo
(
"IN_TEST"
,
selectPositionNum
,
ktkPosition
.
BagWidth
,
ktkPosition
.
BagHigh
);
if
(
Machine
.
ManualIn
(
posindex
,
out
string
errmsg
))
if
(!
Machine
.
StartInStore
(
jobInfo
,
Machine
.
AIOTMoveInfo
))
{
{
MessageBox
.
Show
(
crc
.
GetString
(
"Res0212"
,
"料盘没有到位,无法手动入库"
));
LogUtil
.
info
(
$
"手动入库:{posindex}"
);
return
;
}
else
{
MessageBox
.
Show
(
errmsg
);
}
}
LogUtil
.
info
(
$
"手动入库:{selectPositionNum}"
);
}
}
else
else
{
{
...
@@ -362,13 +368,10 @@ namespace TheMachine
...
@@ -362,13 +368,10 @@ namespace TheMachine
{
{
if
(
Machine
.
runStatus
==
RunStatus
.
Running
)
if
(
Machine
.
runStatus
==
RunStatus
.
Running
)
{
{
string
selectPositionNum
=
cmbPosition
.
Text
;
int
posindex
=
Machine
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
int
posindex
=
Machine
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
LogUtil
.
info
(
$
"库位:{cmbPosition.Text},index:{posindex}"
);
LogUtil
.
info
(
$
"出库位:{cmbPosition.Text},index:{posindex}"
);
ACStorePosition
position
=
Machine
.
StorePosition
[
selectPositionNum
];
if
(
Machine
.
ManualOut
(
posindex
,
out
string
errmsg
))
{
if
(
Machine
.
ManualOut
(
posindex
,
out
string
errmsg
))
{
LogUtil
.
info
(
$
"手动出库:{posindex}"
);
LogUtil
.
info
(
$
"手动出库:{posindex}"
);
//Machine.AddOutStoreTask(selectPositionNum, position.BagWidth, position.BagHigh);
}
}
else
else
{
{
...
...
TheMachine/UCStoreMachine.Designer.cs
查看文件 @
10fea4c
...
@@ -91,11 +91,11 @@ namespace TheMachine
...
@@ -91,11 +91,11 @@ namespace TheMachine
this
.
listView
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
listView
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
listView
.
HeaderStyle
=
System
.
Windows
.
Forms
.
ColumnHeaderStyle
.
Nonclickable
;
this
.
listView
.
HeaderStyle
=
System
.
Windows
.
Forms
.
ColumnHeaderStyle
.
Nonclickable
;
this
.
listView
.
HideSelection
=
false
;
this
.
listView
.
HideSelection
=
false
;
this
.
listView
.
Location
=
new
System
.
Drawing
.
Point
(
39
9
,
0
);
this
.
listView
.
Location
=
new
System
.
Drawing
.
Point
(
42
9
,
0
);
this
.
listView
.
MultiSelect
=
false
;
this
.
listView
.
MultiSelect
=
false
;
this
.
listView
.
Name
=
"listView"
;
this
.
listView
.
Name
=
"listView"
;
this
.
listView
.
ShowGroups
=
false
;
this
.
listView
.
ShowGroups
=
false
;
this
.
listView
.
Size
=
new
System
.
Drawing
.
Size
(
4
68
,
92
);
this
.
listView
.
Size
=
new
System
.
Drawing
.
Size
(
4
38
,
96
);
this
.
listView
.
TabIndex
=
8
;
this
.
listView
.
TabIndex
=
8
;
this
.
listView
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listView
.
UseCompatibleStateImageBehavior
=
false
;
//
//
...
...
TheMachine/UCStoreMachine.cs
查看文件 @
10fea4c
...
@@ -40,14 +40,21 @@ namespace TheMachine
...
@@ -40,14 +40,21 @@ namespace TheMachine
Common
.
AlertListViewSet
(
listView
);
Common
.
AlertListViewSet
(
listView
);
this
.
Tag
=
"not"
;
this
.
Tag
=
"not"
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
Machine_PauseEvent
(
this
,
Machine
.
UserPause
);
}
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
{
crc
.
LanguageProcess
(
this
);
Machine_PauseEvent
(
this
,
Machine
.
UserPause
);
}
}
private
void
Machine_ProcessMsgEvent
(
List
<
Msg
>
msg
)
private
void
Machine_ProcessMsgEvent
(
List
<
Msg
>
msg
)
{
{
if
(!
this
.
Created
)
return
;
if
(
msg
==
null
)
if
(
msg
==
null
)
return
;
return
;
try
try
{
{
this
.
Invoke
((
EventHandler
<
List
<
Msg
>>)
delegate
(
object
s
,
List
<
Msg
>
msgs
)
{
this
.
Invoke
((
EventHandler
<
List
<
Msg
>>)
delegate
(
object
s
,
List
<
Msg
>
msgs
)
{
...
@@ -161,7 +168,7 @@ namespace TheMachine
...
@@ -161,7 +168,7 @@ namespace TheMachine
},
sender
,
e
);
},
sender
,
e
);
return
;
return
;
}
}
btn_stop
.
Text
=
crc
.
GetString
(
"UCStoreMachine_btn_stop_Text"
,
"停止"
);
if
(!
Machine
.
isRunning
)
{
if
(!
Machine
.
isRunning
)
{
btn_stop
.
Enabled
=
false
;
btn_stop
.
Enabled
=
false
;
...
@@ -182,6 +189,7 @@ namespace TheMachine
...
@@ -182,6 +189,7 @@ namespace TheMachine
(
btn_run
as
Button
).
Text
=
crc
.
GetString
(
"Res0197"
,
"暂停运行"
);
(
btn_run
as
Button
).
Text
=
crc
.
GetString
(
"Res0197"
,
"暂停运行"
);
(
btn_run
as
Button
).
BackColor
=
Color
.
Yellow
;
(
btn_run
as
Button
).
BackColor
=
Color
.
Yellow
;
}
}
}
}
private
void
btn_run_Click
(
object
sender
,
EventArgs
e
)
private
void
btn_run_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -218,6 +226,7 @@ namespace TheMachine
...
@@ -218,6 +226,7 @@ namespace TheMachine
}
}
Task
.
Run
(()
=>
{
Machine
.
Stop
();
});
Task
.
Run
(()
=>
{
Machine
.
Stop
();
});
Machine_PauseEvent
(
this
,
Machine
.
UserPause
);
//btn_stop.Enabled = false;
//btn_stop.Enabled = false;
//btn_run.Text = "启动";
//btn_run.Text = "启动";
//btn_run.BackColor = Color.Transparent;
//btn_run.BackColor = Color.Transparent;
...
...
TheMachine/positionTool/FrmPositionTool.cs
查看文件 @
10fea4c
...
@@ -264,7 +264,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -264,7 +264,7 @@ namespace OnlineStore.ACSingleStore
}
}
LogUtil
.
info
(
LogName
+
"伺服已停止运动,停止定时器,记录数据"
);
LogUtil
.
info
(
LogName
+
"伺服已停止运动,停止定时器,记录数据"
);
List
<
string
>
strList
=
new
List
<
string
>();
List
<
string
>
strList
=
new
List
<
string
>();
strList
.
Add
(
crc
.
GetString
(
"Res0201"
,
"编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4"
)
);
strList
.
Add
(
$
"编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4"
);
int
index
=
1
;
int
index
=
1
;
foreach
(
int
p
in
PositionList
)
foreach
(
int
p
in
PositionList
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论