Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1053_CycleLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8ea5ab94
由
刘韬
编写于
2023-08-29 12:40:50 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
76aa78aa
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
180 行增加
和
61 行删除
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/VJCounter.cs
DeviceLibrary/VirtuallyStore/VStore.cs
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/RemoteService.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/theMachine/sub/CI.cs
DeviceLibrary/theMachine/sub/MI.cs
DeviceLibrary/theMachine/sub/TransplantMove.cs
DeviceLibrary/theMachine/sub/TrayStop.cs
RemoteSheardObject/RemoteSheardObject.csproj
RemoteSheardObject/TheLine.cs
TheMachine/device/CIDebugControl.Designer.cs
TheMachine/device/CIDebugControl.cs
TheMachine/device/TransplantControl.Designer.cs
TheMachine/device/TransplantControl.cs
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
8ea5ab9
...
...
@@ -134,6 +134,7 @@
<Compile Include="DeviceLibrary\IOManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="theMachine\sub\IDevice.cs" />
<Compile Include="theMachine\sub\CI.cs" />
<Compile Include="theMachine\sub\MI.cs" />
<Compile Include="theMachine\sub\TrayStop.cs" />
<Compile Include="theMachine\sub\TransplantMove.cs" />
...
...
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
8ea5ab9
...
...
@@ -26,6 +26,7 @@ namespace DeviceLibrary
public
string
AxisName
;
public
bool
ForceSafeCheck
=
false
;
public
string
DeviceGroupName
;
public
bool
Disable
=
false
;
public
AxisBean
(
ConfigMoveAxis
axisConfig
,
string
deviceGroupName
)
{
DeviceGroupName
=
deviceGroupName
;
...
...
DeviceLibrary/DeviceLibrary/VJCounter.cs
查看文件 @
8ea5ab9
...
...
@@ -26,7 +26,7 @@ namespace DeviceLibrary
//_serialPort.RtsEnable = true; //自动请求
//_serialPort.ReadTimeout = 100;//超时
_serialPort
.
Open
();
LogUtil
.
error
(
"VJCounter: 串口连接成功"
);
LogUtil
.
info
(
"VJCounter: 串口连接成功"
);
return
true
;
}
catch
(
Exception
ex
)
{
...
...
@@ -53,6 +53,7 @@ namespace DeviceLibrary
public
static
void
SendBarcode
(
string
barcode
)
{
var
b
=
Encoding
.
ASCII
.
GetBytes
(
barcode
+
"\n"
);
_serialPort
.
Write
(
b
,
0
,
b
.
Length
);
LogUtil
.
info
(
"VJCounter: 串口发送:"
+
barcode
);
}
}
}
DeviceLibrary/VirtuallyStore/VStore.cs
查看文件 @
8ea5ab9
...
...
@@ -157,13 +157,13 @@ namespace DeviceLibrary
else
if
(
RTStoreStatus
==
RTStoreStatus
.
LockToOutStore
)
{
VLog
.
Error
(
$
"出库超时出错,没有检测到出库信息,RTStoreStatus={RTStoreStatus}:"
+
CurrentTerminalReelID
);
CurrentTowerStatusText
=
"出库错误,没有执行出库过程"
;
Msg
.
add
(
$
"TerminalError:"
+
"出库超时"
,
MsgLevel
.
alarm
);
CurrentTowerStatusText
=
crc
.
GetString
(
"Res0112.e6c4624b"
,
"出库错误,没有执行出库过程"
)
;
Msg
.
add
(
$
"TerminalError:"
+
crc
.
GetString
(
"Res0113.71e5a53a"
,
"出库超时"
)
,
MsgLevel
.
alarm
);
}
else
{
VLog
.
Error
(
$
"未知状态超时,RTStoreStatus={RTStoreStatus}:"
+
InStoreJobInfo
?.
ToStr
());
Msg
.
add
(
$
"TerminalError:"
+
"料仓状态异常"
,
MsgLevel
.
warning
);
Msg
.
add
(
$
"TerminalError:"
+
crc
.
GetString
(
"Res0114.d3023f35"
,
"料仓状态异常"
)
,
MsgLevel
.
warning
);
}
}
...
...
@@ -245,18 +245,17 @@ namespace DeviceLibrary
}
else
if
(
ti
.
StatusCode
>=
310000
)
{
if
(
RTStoreStatus
!=
RTStoreStatus
.
InStoreError
)
{
LastProcessErrorTime
=
DateTime
.
Now
.
AddSeconds
(
10
);
LastProcessErrorTimes
=
0
;
}
LastProcessErrorTimes
++;
//
if (RTStoreStatus != RTStoreStatus.InStoreError)
//
{
//
LastProcessErrorTime = DateTime.Now.AddSeconds(10);
//
LastProcessErrorTimes = 0;
//
}
//
LastProcessErrorTimes++;
Msg
.
add
(
$
"StatusCode:{ti.StatusCode},StatusText:{ti.StatusText},OnlineStatus:{ti.OnlineStatus}"
,
MsgLevel
.
warning
);
RTStoreStatus
=
RTStoreStatus
.
InStoreError
;
ServerCM
.
storeStatus
=
StoreStatus
.
InStoreFaild
;
//RTStoreStatus = RTStoreStatus.InStoreError;
//ServerCM.storeStatus = StoreStatus.InStoreFaild;
//CurrentTowerStatusText = $"{ti.StatusText}-{ti.OnlineStatus}";
//InStoreJobInfo = null;
}
else
if
(
ti
.
StatusCode
<
10000
)
{
...
...
@@ -287,7 +286,7 @@ namespace DeviceLibrary
1031 loading material
1032 material put into Terminal from outside
1040 出库执行中
1041 unloading material 物料已到舱门口
1041 unloading material 物料已到舱门口
Remove Component Reel
1042 material unloaded to Terminal from Tower 物料已取走
6015 Reel already loaded.
3068 初始化中
...
...
@@ -350,7 +349,7 @@ namespace DeviceLibrary
return
crc
.
GetString
(
"Res0067"
,
"等待入库信息"
);
if
(
RTStoreStatus
==
RTStoreStatus
.
LockToOutStore
)
return
"等待出库"
;
return
crc
.
GetString
(
"Res0115.44b81dd3"
,
"等待出库"
)
;
if
(
RTStoreStatus
==
RTStoreStatus
.
InStoreExecute
||
RTStoreStatus
==
RTStoreStatus
.
InStoreReady
)
return
crc
.
GetString
(
"Res0068"
,
"入库中"
)
+
" Barcode:"
+
InStoreJobInfo
?.
WareNum
;
...
...
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
查看文件 @
8ea5ab9
...
...
@@ -19,6 +19,16 @@ namespace DeviceLibrary
if
(
IOValue
(
IO_Type
.
Airpressure_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
!
G
.
simulate
)
{
Msg
.
add
(
crc
.
GetString
(
"Res0166"
,
"未检测到气压信号."
),
MsgLevel
.
warning
);
}
var
errorTray
=
TrayManager
.
Traylist
.
ToList
().
Where
(
x
=>
x
.
Value
.
IsLoadError
).
ToList
();
if
(
errorTray
.
Count
>
0
)
{
foreach
(
var
error
in
errorTray
)
{
if
(
error
.
Value
.
HasLoad
)
Msg
.
add
(
crc
.
GetString
(
"Form1_tabc_tab_tmc_Text"
,
"托盘"
)
+
":"
+
error
.
Key
+
" "
+
crc
.
GetString
(
"Res0109.28f408e5"
,
"有物料托盘, 但未检测到物料"
),
MsgLevel
.
alarm
);
else
Msg
.
add
(
crc
.
GetString
(
"Form1_tabc_tab_tmc_Text"
,
"托盘"
)
+
":"
+
error
.
Key
+
" "
+
crc
.
GetString
(
"Res0110.ca6543cd"
,
"空托盘, 但检测到物料"
),
MsgLevel
.
alarm
);
}
}
}
}
}
\ No newline at end of file
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
8ea5ab9
...
...
@@ -287,7 +287,10 @@ namespace DeviceLibrary
if
(
span
.
TotalSeconds
>
2
)
{
checkAlarmTime
=
DateTime
.
Now
;
AxisBean
.
List
.
ToList
().
ForEach
((
x
)
=>
{
x
.
Value
.
ForEach
(
y
=>
{
AxisBean
.
List
.
ToList
().
ForEach
((
x
)
=>
{
x
.
Value
.
ForEach
(
y
=>
{
if
(
y
.
Disable
)
return
;
AxisManager
.
AlarmClear
(
y
.
Config
.
DeviceName
,
y
.
Config
.
GetAxisValue
());
if
(
AxisManager
.
GetAlarmStatus
(
y
.
Config
.
DeviceName
,
y
.
Config
.
GetAxisValue
())
==
1
)
{
...
...
DeviceLibrary/theMachine/RemoteService.cs
查看文件 @
8ea5ab9
...
...
@@ -170,7 +170,7 @@ namespace DeviceLibrary
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"等待{GroupName}反馈超时 seq:"
+
seq
+
" 出错:"
+
ex
);
return
RemoteResult
.
Timeout
;
}
}
}
static
void
SendResult
(
string
deviceGroupName
,
bool
result
,
long
Seq
)
{
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
8ea5ab9
...
...
@@ -95,7 +95,7 @@ namespace DeviceLibrary
if
(!
VJCounter
.
Connect
(
Setting_Init
.
VJCounter_COMPORT
,
out
string
msgs
))
{
IsLoadOk
=
false
;
msg
+=
"VJ点料机连接失败"
+
"\n"
;
msg
+=
crc
.
GetString
(
"Res0111.43f91cee"
,
"VJ点料机连接失败"
)
+
"\n"
;
LogUtil
.
error
(
msg
+
","
+
msgs
);
}
...
...
DeviceLibrary/theMachine/sub/CI.cs
0 → 100644
查看文件 @
8ea5ab9
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/sub/MI.cs
查看文件 @
8ea5ab9
...
...
@@ -160,7 +160,8 @@ namespace DeviceLibrary
return
;
}
//判断有无出库任务
var
testInStoreError
=
VStoreCollection
.
VStoreList
.
Values
.
Where
(
vs
=>
vs
.
TowerInfo
.
DeviceGroupName
==
GroupName
).
ToList
().
Find
(
vs
=>
DateTime
.
Now
>
vs
.
LastProcessErrorTime
&&
vs
.
LastProcessErrorTimes
<
4
&&
(
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreError
||
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreDataTimeOut
||
vs
.
TerminalError
));
//var testInStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => DateTime.Now > vs.LastProcessErrorTime && vs.LastProcessErrorTimes<4 && (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError));
var
testInStoreError
=
VStoreCollection
.
VStoreList
.
Values
.
Where
(
vs
=>
vs
.
TowerInfo
.
DeviceGroupName
==
GroupName
).
ToList
().
Find
(
vs
=>
(
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreError
||
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreDataTimeOut
||
vs
.
TerminalError
));
var
hasoutjob
=
false
;
if
(
testInStoreError
!=
null
)
hasoutjob
=
true
;
...
...
@@ -254,7 +255,8 @@ namespace DeviceLibrary
}
break
;
case
MoveStep
.
MI_50
:
var
InStoreError
=
VStoreCollection
.
VStoreList
.
Values
.
Where
(
vs
=>
vs
.
TowerInfo
.
DeviceGroupName
==
GroupName
).
ToList
().
Find
(
vs
=>
DateTime
.
Now
>
vs
.
LastProcessErrorTime
&&
vs
.
LastProcessErrorTimes
<
4
&&
(
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreError
||
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreDataTimeOut
||
vs
.
TerminalError
));
//var InStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => DateTime.Now > vs.LastProcessErrorTime && vs.LastProcessErrorTimes < 4 && (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError));
var
InStoreError
=
VStoreCollection
.
VStoreList
.
Values
.
Where
(
vs
=>
vs
.
TowerInfo
.
DeviceGroupName
==
GroupName
).
ToList
().
Find
(
vs
=>
(
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreError
||
vs
.
RTStoreStatus
==
RTStoreStatus
.
InStoreDataTimeOut
||
vs
.
TerminalError
));
if
(
InStoreError
!=
null
)
{
var
result
=
TheLine
.
GetReelSize
<
ResultData
>(
InStoreError
.
CurrentTerminalReelID
);
...
...
DeviceLibrary/theMachine/sub/TransplantMove.cs
查看文件 @
8ea5ab9
...
...
@@ -34,6 +34,8 @@ namespace DeviceLibrary
AxisBean
axis
;
CylinderManger
Location
;
CylinderManger
Transplant
;
public
bool
Disable
{
get
;
set
;
}=
false
;
public
DeviceStateE
DeviceState
{
get
;
set
;
}
public
TransplantMove
(
DeviceGroup
device
,
Robot_Config
config
,
out
string
msg
)
:
base
()
...
...
@@ -60,7 +62,16 @@ namespace DeviceLibrary
}
public
void
Start
()
{
OpenAllServo
();
axis
.
Disable
=
Disable
;
if
(
Disable
)
{
MoveInfo
.
log
(
"移栽设备已禁用"
);
}
else
{
OpenAllServo
();
}
DeviceState
=
DeviceStateE
.
HomeReset
;
MoveInfo
.
NewMove
(
MoveStep
.
H01_HomeReset
);
MoveInfo
.
log
(
"开始回原"
);
...
...
@@ -127,9 +138,18 @@ namespace DeviceLibrary
IOMove
(
IO_Type
.
AMH_Front_Stop
,
IO_VALUE
.
LOW
);
if
(
IOValue
(
IO_Type
.
AMH_In_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TransplantMove_03
);
if
(
Disable
)
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TransplantMove_04
);
MoveInfo
.
log
(
"移栽设备禁用,直接通过"
);
Location
.
ToLow
(
MoveInfo
);
}
else
MoveInfo
.
NextMoveStep
(
MoveStep
.
TransplantMove_03
);
MoveInfo
.
CanWhileCount
=
3
;
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
//Location.ToHigh(MoveInfo);
}
else
if
(
MoveInfo
.
IsTimeOut
(
10
))
{
...
...
@@ -551,16 +571,18 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
H01_HomeReset
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
H02_HomeReset
);
axis
.
HomeMove
(
MoveInfo
);
if
(!
Disable
)
axis
.
HomeMove
(
MoveInfo
);
break
;
case
MoveStep
.
H02_HomeReset
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
H03_HomeReset
);
Location
.
ToLow
(
MoveInfo
);
Transplant
.
ToLow
(
MoveInfo
);
if
(!
Disable
)
Transplant
.
ToLow
(
MoveInfo
);
break
;
case
MoveStep
.
H03_HomeReset
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
H04_HomeReset
);
if
(
ConfigHelper
.
Config
.
Get
(
$
"Runtime_{GroupName}_IsSucker"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
$
"Runtime_{GroupName}_IsSucker"
,
false
)
&&
!
Disable
)
{
if
(
string
.
IsNullOrEmpty
(
CurrrentRFID
))
CurrrentRFID
=
ConfigHelper
.
Config
.
Get
(
$
"Runtime_{GroupName}_CurrrentRFID"
);
...
...
DeviceLibrary/theMachine/sub/TrayStop.cs
查看文件 @
8ea5ab9
...
...
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using
System.Collections.Specialized
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Security.Cryptography
;
using
System.Text
;
using
System.Threading.Tasks
;
...
...
@@ -150,7 +151,7 @@ namespace DeviceLibrary
var
stop
=
TrayManager
.
TryGetTrayRequest
(
GroupName
,
CurrrentRFID
,
out
_
);
MoveInfo
.
log
(
$
"CurrrentRFID:{CurrrentRFID},HasLoad:{trayInfo.HasLoad},MI_Reel_Check:{IOValue(IO_Type.MI_Reel_Check)},NeedStop:{stop}"
);
#
region
MI1
,
Mi2
的情况判断
if
((
GroupName
==
"AMH-MI1"
||
GroupName
==
"AMH-MI2"
)
&&
trayInfo
.
TrayType
==
TrayTypeE
.
MTP1
)
if
((
GroupName
==
"AMH-MI1"
||
GroupName
==
"AMH-MI2"
)
&&
trayInfo
.
TrayType
==
TrayTypeE
.
MTP1
)
{
/*
* 请求一个空托盘
...
...
@@ -185,7 +186,8 @@ namespace DeviceLibrary
MoveInfo
.
log
(
"检测到机器人急停,托盘放行处理"
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_04
);
return
;
}
else
}
else
if
(!
trayInfo
.
HasLoad
&&
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_07
);
...
...
@@ -201,7 +203,8 @@ namespace DeviceLibrary
}
else
if
(
trayInfo
.
DestinationAddr
==
DeviceGroup
.
addr_1
&&
trayInfo
.
HasLoad
)
{
if
(
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
TrayManager
.
SetTrayError
(
CurrrentRFID
);
Msg
.
add
(
crc
.
GetString
(
"Res0034"
,
"托盘没有检测到物料"
),
MsgLevel
.
alarm
);
MoveInfo
.
log
(
"托盘没有检测到物料"
);
...
...
@@ -212,11 +215,11 @@ namespace DeviceLibrary
if
(
VStoreCollection
.
VStoreList
[
cid
].
RTStoreStatus
==
RTStoreStatus
.
Offline
)
{
MoveInfo
.
log
(
$
"当前需求设备CID:{cid}已离线"
);
var
rm
=
TheLine
.
Regetposid
(
trayInfo
.
TrayParam
,
trayInfo
.
TrayType
.
ToString
(),
out
string
msg
);
var
rm
=
TheLine
.
Regetposid
(
trayInfo
.
TrayParam
,
trayInfo
.
TrayType
.
ToString
(),
out
string
msg
);
MoveInfo
.
log
(
$
"重新获取库位 msg:{msg},\t {rm.ToStr()}"
);
RequestLoadInfo
RequestLoadInfo
=
new
RequestLoadInfo
();
RequestLoadInfo
.
LoadParam
=
rm
.
clone
();
RequestLoadInfo
.
DeviceGroupName
=
rm
.
cid
;
RequestLoadInfo
.
DeviceGroupName
=
rm
.
cid
;
RequestLoadInfo
.
TrayType
=
trayInfo
.
TrayType
.
ToString
();
RequestLoadInfo
.
IsEmpty
=
false
;
TrayManager
.
SetTrayLoadInfo
(
CurrrentRFID
,
RequestLoadInfo
);
...
...
@@ -242,6 +245,37 @@ namespace DeviceLibrary
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_04
);
return
;
}
else
if
(
GroupName
==
"CI"
&&
trayInfo
.
TrayType
==
TrayTypeE
.
MTP1
)
{
var
device
=
CI
.
DeviceList
[
GroupName
];
if
(!
device
.
ManualCount
)
{
MoveInfo
.
log
(
$
"点料机当前不可用,NG处理"
);
RequestLoadInfo
RequestLoadInfo
=
new
RequestLoadInfo
();
RequestLoadInfo
.
LoadParam
=
trayInfo
.
TrayParam
.
clone
();
RequestLoadInfo
.
LoadParam
.
IsNg
=
true
;
RequestLoadInfo
.
LoadParam
.
NgMsg
=
"XRay not enable"
;
RequestLoadInfo
.
DeviceGroupName
=
"AMH-MI2"
;
RequestLoadInfo
.
TrayType
=
trayInfo
.
TrayType
.
ToString
();
RequestLoadInfo
.
IsEmpty
=
false
;
TrayManager
.
SetTrayLoadInfo
(
CurrrentRFID
,
RequestLoadInfo
);
//查询新库位, 检查料仓状态
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_03
);
return
;
}
else
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_07
);
//抵达了一个有物料的托盘等待处理
if
(!
device
.
HasJob
(
trayInfo
.
TrayParam
))
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_04
);
else
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
TrayStop_07
);
device
.
StartInStore
(
trayInfo
.
TrayParam
);
}
}
}
#
endregion
if
(
stop
&&
!
trayInfo
.
HasLoad
&&
IOValue
(
IO_Type
.
MI_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
RemoteSheardObject/RemoteSheardObject.csproj
查看文件 @
8ea5ab9
...
...
@@ -103,5 +103,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{43CDD09E-FCF3-4960-A01D-3BBFE9933122}</Project>
<Name>Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
RemoteSheardObject/TheLine.cs
查看文件 @
8ea5ab9
using
ConfigHelper
;
using
Newtonsoft.Json
;
using
OnlineStore
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Specialized
;
...
...
@@ -298,7 +299,7 @@ namespace RemoteSheardObject
if
(
mid
==
"AMH-MI1"
||
mid
==
"AMH-MI2"
)
{
var
micode
=
$
"P{reelParam.PN}#S{reelParam.RI}#{reelParam.QTY}#{reelParam.DC}"
;
msg
+=
"送往MI物料重组2dcode:"
+
micode
;
msg
+=
$
"送往MI物料重组2dcode:"
+
micode
;
reelParam
.
SubCID
=
result
.
cid
;
reelParam
.
WareCode
=
micode
;
...
...
TheMachine/device/CIDebugControl.Designer.cs
查看文件 @
8ea5ab9
...
...
@@ -34,12 +34,13 @@
this
.
txt_barcode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label_barcode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
cb_manualcount
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
SuspendLayout
();
//
// label_status
//
this
.
label_status
.
AutoSize
=
true
;
this
.
label_status
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
86
);
this
.
label_status
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
128
);
this
.
label_status
.
Name
=
"label_status"
;
this
.
label_status
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label_status
.
TabIndex
=
0
;
...
...
@@ -47,7 +48,7 @@
//
// btn_start
//
this
.
btn_start
.
Location
=
new
System
.
Drawing
.
Point
(
325
,
86
);
this
.
btn_start
.
Location
=
new
System
.
Drawing
.
Point
(
325
,
128
);
this
.
btn_start
.
Name
=
"btn_start"
;
this
.
btn_start
.
Size
=
new
System
.
Drawing
.
Size
(
135
,
23
);
this
.
btn_start
.
TabIndex
=
1
;
...
...
@@ -57,7 +58,7 @@
//
// txt_barcode
//
this
.
txt_barcode
.
Location
=
new
System
.
Drawing
.
Point
(
123
,
34
);
this
.
txt_barcode
.
Location
=
new
System
.
Drawing
.
Point
(
123
,
76
);
this
.
txt_barcode
.
Name
=
"txt_barcode"
;
this
.
txt_barcode
.
Size
=
new
System
.
Drawing
.
Size
(
337
,
21
);
this
.
txt_barcode
.
TabIndex
=
2
;
...
...
@@ -66,7 +67,7 @@
// label_barcode
//
this
.
label_barcode
.
AutoSize
=
true
;
this
.
label_barcode
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
37
);
this
.
label_barcode
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
79
);
this
.
label_barcode
.
Name
=
"label_barcode"
;
this
.
label_barcode
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
label_barcode
.
TabIndex
=
0
;
...
...
@@ -78,10 +79,22 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// cb_manualcount
//
this
.
cb_manualcount
.
AutoSize
=
true
;
this
.
cb_manualcount
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
27
);
this
.
cb_manualcount
.
Name
=
"cb_manualcount"
;
this
.
cb_manualcount
.
Size
=
new
System
.
Drawing
.
Size
(
96
,
16
);
this
.
cb_manualcount
.
TabIndex
=
3
;
this
.
cb_manualcount
.
Text
=
"手动拦截点料"
;
this
.
cb_manualcount
.
UseVisualStyleBackColor
=
true
;
this
.
cb_manualcount
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_manualcount_CheckedChanged
);
//
// CIDebugControl
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Controls
.
Add
(
this
.
cb_manualcount
);
this
.
Controls
.
Add
(
this
.
txt_barcode
);
this
.
Controls
.
Add
(
this
.
btn_start
);
this
.
Controls
.
Add
(
this
.
label_barcode
);
...
...
@@ -100,5 +113,6 @@
private
System
.
Windows
.
Forms
.
TextBox
txt_barcode
;
private
System
.
Windows
.
Forms
.
Label
label_barcode
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_manualcount
;
}
}
TheMachine/device/CIDebugControl.cs
查看文件 @
8ea5ab9
using
DeviceLibrary
;
using
OnlineStore
;
using
DeviceLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -50,13 +51,18 @@ namespace TheMachine.device
LogUtil
.
info
(
"手动点击开始点料"
);
}
else
{
MessageBox
.
Show
(
"未成功连接VJ点料机"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0117.c9f109fe"
,
"未成功连接VJ点料机"
)
);
}
}
else
{
MessageBox
.
Show
(
"点料机没有准备好,不能启动."
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0118.f955ef4e"
,
"点料机没有准备好,不能启动."
)
);
}
}
private
void
cb_manualcount_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
CI
.
DeviceList
[
"CI"
].
ManualCount
=
cb_manualcount
.
Checked
;
}
}
}
}
\ No newline at end of file
TheMachine/device/TransplantControl.Designer.cs
查看文件 @
8ea5ab9
...
...
@@ -43,9 +43,10 @@ namespace TheMachine
this
.
cylinderButton1
=
new
TheMachine
.
CylinderButton
();
this
.
ioControl1
=
new
TheMachine
.
IOControl
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
btn_Reset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_sucker_release
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
rfidControl1
=
new
TheMachine
.
UC
.
RfidControl
();
this
.
btn_Reset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_disabledevice
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
panel1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -59,7 +60,7 @@ namespace TheMachine
//
// button_save
//
this
.
button_save
.
Location
=
new
System
.
Drawing
.
Point
(
7
55
,
623
);
this
.
button_save
.
Location
=
new
System
.
Drawing
.
Point
(
7
62
,
640
);
this
.
button_save
.
Name
=
"button_save"
;
this
.
button_save
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
23
);
this
.
button_save
.
TabIndex
=
7
;
...
...
@@ -69,21 +70,21 @@ namespace TheMachine
//
// textBox_p2
//
this
.
textBox_p2
.
Location
=
new
System
.
Drawing
.
Point
(
7
58
,
544
);
this
.
textBox_p2
.
Location
=
new
System
.
Drawing
.
Point
(
7
65
,
570
);
this
.
textBox_p2
.
Name
=
"textBox_p2"
;
this
.
textBox_p2
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox_p2
.
TabIndex
=
8
;
//
// textBox_p3
//
this
.
textBox_p3
.
Location
=
new
System
.
Drawing
.
Point
(
7
55
,
587
);
this
.
textBox_p3
.
Location
=
new
System
.
Drawing
.
Point
(
7
62
,
613
);
this
.
textBox_p3
.
Name
=
"textBox_p3"
;
this
.
textBox_p3
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox_p3
.
TabIndex
=
8
;
//
// button_p2
//
this
.
button_p2
.
Location
=
new
System
.
Drawing
.
Point
(
58
1
,
542
);
this
.
button_p2
.
Location
=
new
System
.
Drawing
.
Point
(
58
8
,
568
);
this
.
button_p2
.
Name
=
"button_p2"
;
this
.
button_p2
.
Size
=
new
System
.
Drawing
.
Size
(
162
,
23
);
this
.
button_p2
.
TabIndex
=
9
;
...
...
@@ -93,7 +94,7 @@ namespace TheMachine
//
// button_p3
//
this
.
button_p3
.
Location
=
new
System
.
Drawing
.
Point
(
5
78
,
585
);
this
.
button_p3
.
Location
=
new
System
.
Drawing
.
Point
(
5
85
,
611
);
this
.
button_p3
.
Name
=
"button_p3"
;
this
.
button_p3
.
Size
=
new
System
.
Drawing
.
Size
(
162
,
23
);
this
.
button_p3
.
TabIndex
=
9
;
...
...
@@ -103,7 +104,7 @@ namespace TheMachine
//
// button_p1
//
this
.
button_p1
.
Location
=
new
System
.
Drawing
.
Point
(
58
1
,
513
);
this
.
button_p1
.
Location
=
new
System
.
Drawing
.
Point
(
58
8
,
539
);
this
.
button_p1
.
Name
=
"button_p1"
;
this
.
button_p1
.
Size
=
new
System
.
Drawing
.
Size
(
162
,
23
);
this
.
button_p1
.
TabIndex
=
9
;
...
...
@@ -118,7 +119,7 @@ namespace TheMachine
this
.
cylinderButton8
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton8
.
IO_HIGH
=
"AMH_Front_Stop"
;
this
.
cylinderButton8
.
IO_LOW
=
""
;
this
.
cylinderButton8
.
Location
=
new
System
.
Drawing
.
Point
(
6
18
,
378
);
this
.
cylinderButton8
.
Location
=
new
System
.
Drawing
.
Point
(
6
25
,
404
);
this
.
cylinderButton8
.
Name
=
"cylinderButton8"
;
this
.
cylinderButton8
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
38
);
this
.
cylinderButton8
.
TabIndex
=
2
;
...
...
@@ -133,7 +134,7 @@ namespace TheMachine
this
.
cylinderButton2
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton2
.
IO_HIGH
=
"AMH_Tray_Stop"
;
this
.
cylinderButton2
.
IO_LOW
=
""
;
this
.
cylinderButton2
.
Location
=
new
System
.
Drawing
.
Point
(
6
18
,
422
);
this
.
cylinderButton2
.
Location
=
new
System
.
Drawing
.
Point
(
6
25
,
448
);
this
.
cylinderButton2
.
Name
=
"cylinderButton2"
;
this
.
cylinderButton2
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
38
);
this
.
cylinderButton2
.
TabIndex
=
3
;
...
...
@@ -148,7 +149,7 @@ namespace TheMachine
this
.
cylinderButton7
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton7
.
IO_HIGH
=
"AMH_Sucker"
;
this
.
cylinderButton7
.
IO_LOW
=
""
;
this
.
cylinderButton7
.
Location
=
new
System
.
Drawing
.
Point
(
6
18
,
337
);
this
.
cylinderButton7
.
Location
=
new
System
.
Drawing
.
Point
(
6
25
,
363
);
this
.
cylinderButton7
.
Name
=
"cylinderButton7"
;
this
.
cylinderButton7
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
38
);
this
.
cylinderButton7
.
TabIndex
=
3
;
...
...
@@ -163,7 +164,7 @@ namespace TheMachine
this
.
cylinderButton6
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton6
.
IO_HIGH
=
"AMH_Trans_Fwd"
;
this
.
cylinderButton6
.
IO_LOW
=
"AMH_Trans_Bwd"
;
this
.
cylinderButton6
.
Location
=
new
System
.
Drawing
.
Point
(
6
18
,
293
);
this
.
cylinderButton6
.
Location
=
new
System
.
Drawing
.
Point
(
6
25
,
319
);
this
.
cylinderButton6
.
Name
=
"cylinderButton6"
;
this
.
cylinderButton6
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
38
);
this
.
cylinderButton6
.
TabIndex
=
4
;
...
...
@@ -178,7 +179,7 @@ namespace TheMachine
this
.
cylinderButton1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton1
.
IO_HIGH
=
"AMH_Location_Up"
;
this
.
cylinderButton1
.
IO_LOW
=
"AMH_Location_Down"
;
this
.
cylinderButton1
.
Location
=
new
System
.
Drawing
.
Point
(
6
18
,
249
);
this
.
cylinderButton1
.
Location
=
new
System
.
Drawing
.
Point
(
6
25
,
275
);
this
.
cylinderButton1
.
Name
=
"cylinderButton1"
;
this
.
cylinderButton1
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
38
);
this
.
cylinderButton1
.
TabIndex
=
5
;
...
...
@@ -197,6 +198,7 @@ namespace TheMachine
// panel1
//
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
Controls
.
Add
(
this
.
cb_disabledevice
);
this
.
panel1
.
Controls
.
Add
(
this
.
btn_Reset
);
this
.
panel1
.
Controls
.
Add
(
this
.
btn_sucker_release
);
this
.
panel1
.
Controls
.
Add
(
this
.
rfidControl1
);
...
...
@@ -219,11 +221,21 @@ namespace TheMachine
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1021
,
741
);
this
.
panel1
.
TabIndex
=
10
;
//
// btn_Reset
//
this
.
btn_Reset
.
Location
=
new
System
.
Drawing
.
Point
(
770
,
140
);
this
.
btn_Reset
.
Name
=
"btn_Reset"
;
this
.
btn_Reset
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
69
);
this
.
btn_Reset
.
TabIndex
=
12
;
this
.
btn_Reset
.
Text
=
"Reset"
;
this
.
btn_Reset
.
UseVisualStyleBackColor
=
true
;
this
.
btn_Reset
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_Reset_Click
);
//
// btn_sucker_release
//
this
.
btn_sucker_release
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btn_sucker_release
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn_sucker_release
.
Location
=
new
System
.
Drawing
.
Point
(
6
18
,
469
);
this
.
btn_sucker_release
.
Location
=
new
System
.
Drawing
.
Point
(
6
25
,
495
);
this
.
btn_sucker_release
.
Name
=
"btn_sucker_release"
;
this
.
btn_sucker_release
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
38
);
this
.
btn_sucker_release
.
TabIndex
=
11
;
...
...
@@ -240,15 +252,16 @@ namespace TheMachine
this
.
rfidControl1
.
TabIndex
=
10
;
this
.
rfidControl1
.
Visible
=
false
;
//
//
btn_Reset
//
cb_disabledevice
//
this
.
btn_Reset
.
Location
=
new
System
.
Drawing
.
Point
(
770
,
140
);
this
.
btn_Reset
.
Name
=
"btn_Reset"
;
this
.
btn_Reset
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
69
);
this
.
btn_Reset
.
TabIndex
=
12
;
this
.
btn_Reset
.
Text
=
"Reset"
;
this
.
btn_Reset
.
UseVisualStyleBackColor
=
true
;
this
.
btn_Reset
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_Reset_Click
);
this
.
cb_disabledevice
.
AutoSize
=
true
;
this
.
cb_disabledevice
.
Location
=
new
System
.
Drawing
.
Point
(
588
,
245
);
this
.
cb_disabledevice
.
Name
=
"cb_disabledevice"
;
this
.
cb_disabledevice
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
16
);
this
.
cb_disabledevice
.
TabIndex
=
13
;
this
.
cb_disabledevice
.
Text
=
"Disable device"
;
this
.
cb_disabledevice
.
UseVisualStyleBackColor
=
true
;
this
.
cb_disabledevice
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_disabledevice_CheckedChanged
);
//
// TransplantControl
//
...
...
@@ -282,5 +295,6 @@ namespace TheMachine
private
UC
.
RfidControl
rfidControl1
;
private
System
.
Windows
.
Forms
.
Button
btn_sucker_release
;
private
System
.
Windows
.
Forms
.
Button
btn_Reset
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_disabledevice
;
}
}
TheMachine/device/TransplantControl.cs
查看文件 @
8ea5ab9
...
...
@@ -96,5 +96,10 @@ namespace TheMachine
{
TransplantMove
.
DeviceList
[
DeviceGroupName
].
ResetStatus
();
}
private
void
cb_disabledevice_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
TransplantMove
.
DeviceList
[
DeviceGroupName
].
Disable
=
cb_disabledevice
.
Checked
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论