Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d5f8f28c
由
LN
编写于
2021-04-15 15:25:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
去掉记录保存的注释
1 个父辈
8acb1138
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
65 行增加
和
83 行删除
DeviceLibrary/SQLite.cs
DeviceLibrary/manager/WorkInfo.cs
DeviceLibrary/mes/DeviceStatus.cs
DeviceLibrary/mes/MesUtil.cs
TSA-V/App.config
TSA-V/workForm/FrmTSAV.cs
DeviceLibrary/SQLite.cs
查看文件 @
d5f8f28
...
...
@@ -114,10 +114,13 @@ namespace DAL
rtn
=
Execute
(
sql
);
if
(!
rtn
)
break
;
}
LogUtil
.
info
(
"数据库Commit"
);
if
(
rtn
)
tr
.
Commit
();
else
tr
.
Rollback
();
LogUtil
.
info
(
"数据库 完成"
);
}
return
rtn
;
...
...
DeviceLibrary/manager/WorkInfo.cs
查看文件 @
d5f8f28
...
...
@@ -98,12 +98,12 @@ namespace TSA_V.DeviceLibrary
MesUtil
.
SendStatus
(
deviceStatus
);
}
deviceStatus
.
workInfo
.
ID
=
LastDBId
;
//
DB.db.AddHistory(deviceStatus.workInfo, out int id);
//
if (LastDBId < 0)
//
{
//
LastDBId = id;
//
LogUtil.info("保存LastDBId=" + LastDBId);
//
}
DB
.
db
.
AddHistory
(
deviceStatus
.
workInfo
,
out
int
id
);
if
(
LastDBId
<
0
)
{
LastDBId
=
id
;
LogUtil
.
info
(
"保存LastDBId="
+
LastDBId
);
}
if
(
currBoard
!=
null
)
{
LogUtil
.
info
(
"停止程序【"
+
currBoard
.
boardName
+
"】工作"
);
...
...
@@ -111,11 +111,13 @@ namespace TSA_V.DeviceLibrary
//把上次的旋转轴转回待机点
if
(
this
.
WorkType
.
Equals
(
1
)
&&
PreNodeId
>
0
)
{
PUSICANControl
.
StopMove
(
PreNodeId
);
Thread
.
Sleep
(
10
);
//上一个节点返回原点
PUSICANControl
.
AbsMove
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
Thread
.
Sleep
(
10
);
}
Thread
.
Sleep
(
100
);
//
Thread.Sleep(100);
endWorkTime
=
DateTime
.
Now
;
IsShowAOI
=
false
;
IsWorking
=
false
;
...
...
DeviceLibrary/mes/DeviceStatus.cs
查看文件 @
d5f8f28
...
...
@@ -58,6 +58,33 @@ namespace TSA_V.DeviceLibrary
/// 组装元器件列表
/// </summary>
public
List
<
OpPointInfo
>
pointList
{
get
;
set
;
}
public
static
OpInfo
GetOpInfo
(
BoardInfo
board
,
int
maxIndex
=
-
1
)
{
//maxIndex=-1,没有oplist
OpInfo
op
=
new
OpInfo
();
op
.
ProName
=
board
.
boardName
;
op
.
ProType
=
board
.
boardCode
;
op
.
BoardWidth
=
board
.
boardWidth
;
op
.
BoardLength
=
board
.
boardLength
;
op
.
pointList
=
new
List
<
OpPointInfo
>();
if
(
maxIndex
>
0
)
{
int
index
=
0
;
foreach
(
SMTPointInfo
sm
in
board
.
smtList
)
{
if
(
maxIndex
>
0
&&
index
>
maxIndex
)
{
break
;
}
op
.
pointList
.
Add
(
new
OpPointInfo
(
sm
.
PartNum
,
sm
.
pointName
));
index
++;
}
}
return
op
;
}
}
public
class
OpPointInfo
...
...
DeviceLibrary/mes/MesUtil.cs
查看文件 @
d5f8f28
...
...
@@ -127,44 +127,17 @@ namespace TSA_V.DeviceLibrary
OpInfo
op
=
new
OpInfo
();
if
(
TSAVBean
.
Work
.
IsWorking
)
{
BoardInfo
board
=
TSAVBean
.
Work
.
currBoard
;
op
.
ProName
=
board
.
boardName
;
op
.
ProType
=
board
.
boardCode
;
if
(
CodeISOk
)
{
op
.
BarCode
=
CurrPCBCode
;
op
.
AoiResult
=
CurrAOIResult
;
}
op
.
BoardWidth
=
board
.
boardWidth
;
op
.
BoardLength
=
board
.
boardLength
;
op
.
pointList
=
new
List
<
OpPointInfo
>();
int
index
=
0
;
foreach
(
SMTPointInfo
sm
in
board
.
smtList
)
{
if
(
index
>
TSAVBean
.
Work
.
currIndex
)
{
break
;
}
op
.
pointList
.
Add
(
new
OpPointInfo
(
sm
.
PartNum
,
sm
.
pointName
));
index
++;
}
op
=
OpInfo
.
GetOpInfo
(
TSAVBean
.
Work
.
currBoard
,
TSAVBean
.
Work
.
currIndex
);
}
else
if
(
TSAVBean
.
LineStep
.
moveType
.
Equals
(
1
))
{
BoardInfo
board
=
TSAVBean
.
Work
.
currBoard
;
op
.
ProName
=
board
.
boardName
;
op
.
ProType
=
board
.
boardCode
;
op
=
OpInfo
.
GetOpInfo
(
TSAVBean
.
Work
.
currBoard
);
}
if
(
CodeISOk
)
{
op
.
BarCode
=
CurrPCBCode
;
op
.
AoiResult
=
CurrAOIResult
;
}
op
.
BoardWidth
=
board
.
boardWidth
;
op
.
BoardLength
=
board
.
boardLength
;
op
.
pointList
=
new
List
<
OpPointInfo
>();
}
return
op
;
}
...
...
@@ -176,43 +149,14 @@ namespace TSA_V.DeviceLibrary
if
(
TSAVBean
.
Work
.
IsWorking
)
{
deviceStatus
.
CurrStatus
=
3
;
BoardInfo
board
=
TSAVBean
.
Work
.
currBoard
;
op
.
ProName
=
board
.
boardName
;
op
.
ProType
=
board
.
boardCode
;
if
(
CodeISOk
)
{
op
.
BarCode
=
CurrPCBCode
;
op
.
AoiResult
=
CurrAOIResult
;
}
op
.
BoardWidth
=
board
.
boardWidth
;
op
.
BoardLength
=
board
.
boardLength
;
op
.
pointList
=
new
List
<
OpPointInfo
>();
int
index
=
0
;
foreach
(
SMTPointInfo
sm
in
board
.
smtList
)
{
if
(
index
>
TSAVBean
.
Work
.
currIndex
)
{
break
;
}
op
.
pointList
.
Add
(
new
OpPointInfo
(
sm
.
PartNum
,
sm
.
pointName
));
index
++;
}
op
=
OpInfo
.
GetOpInfo
(
TSAVBean
.
Work
.
currBoard
,
TSAVBean
.
Work
.
currIndex
);
}
else
if
(
TSAVBean
.
LineStep
.
moveType
.
Equals
(
1
))
{
deviceStatus
.
CurrStatus
=
3
;
BoardInfo
board
=
TSAVBean
.
Work
.
currBoard
;
op
.
ProName
=
board
.
boardName
;
op
.
ProType
=
board
.
boardCode
;
if
(
CodeISOk
)
{
op
.
BarCode
=
CurrPCBCode
;
op
.
AoiResult
=
CurrAOIResult
;
}
op
.
BoardWidth
=
board
.
boardWidth
;
op
.
BoardLength
=
board
.
boardLength
;
op
.
pointList
=
new
List
<
OpPointInfo
>();
op
=
OpInfo
.
GetOpInfo
(
TSAVBean
.
Work
.
currBoard
);
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Reset
))
{
...
...
@@ -222,7 +166,11 @@ namespace TSA_V.DeviceLibrary
{
deviceStatus
.
CurrStatus
=
2
;
}
if
(
CodeISOk
)
{
op
.
BarCode
=
CurrPCBCode
;
op
.
AoiResult
=
CurrAOIResult
;
}
deviceStatus
.
workInfo
=
op
;
deviceStatus
.
WarnMsg
=
TSAVBean
.
WarnMsg
;
string
msg
=
JsonHelper
.
SerializeObject
(
deviceStatus
);
...
...
@@ -232,20 +180,20 @@ namespace TSA_V.DeviceLibrary
public
static
DeviceStatus
GetTestStatus
(
BoardInfo
board
,
string
pcbcode
=
""
)
{
DeviceStatus
deviceStatus
=
new
DeviceStatus
();
OpInfo
op
=
new
OpInfo
(
);
OpInfo
op
=
OpInfo
.
GetOpInfo
(
board
,
board
.
smtList
.
Count
);
deviceStatus
.
CurrStatus
=
3
;
op
.
ProName
=
board
.
boardName
;
op
.
ProType
=
board
.
boardCode
;
op
.
BarCode
=
pcbcode
;
op
.
BoardWidth
=
board
.
boardWidth
;
op
.
BoardLength
=
board
.
boardLength
;
op
.
pointList
=
new
List
<
OpPointInfo
>();
foreach
(
SMTPointInfo
sm
in
board
.
smtList
)
{
op
.
pointList
.
Add
(
new
OpPointInfo
(
sm
.
PartNum
,
sm
.
pointName
));
}
//
op.ProName = board.boardName;
//
op.ProType = board.boardCode;
//
op.BarCode = pcbcode;
//
op.BoardWidth = board.boardWidth;
//
op.BoardLength = board.boardLength;
//
op.pointList = new List<OpPointInfo>();
//
foreach (SMTPointInfo sm in board.smtList)
//
{
//
op.pointList.Add(new OpPointInfo(sm.PartNum, sm.pointName));
//
}
deviceStatus
.
workInfo
=
op
;
deviceStatus
.
WarnMsg
=
TSAVBean
.
WarnMsg
;
string
msg
=
JsonHelper
.
SerializeObject
(
deviceStatus
);
...
...
TSA-V/App.config
查看文件 @
d5f8f28
...
...
@@ -85,7 +85,7 @@
<!--
AOI
程序文件夹-->
<
add
key
=
"AOIFileConfig"
value
=
"\config\AOIConfig\"
/>
<!--是否启动
AOI
-->
<
add
key
=
"IsNeedAOI"
value
=
"
1
"
/>
<
add
key
=
"IsNeedAOI"
value
=
"
0
"
/>
<
add
key
=
"DefaultPointSize"
value
=
"5"
/>
<
add
key
=
"DefaultPointType"
value
=
"1"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
...
...
TSA-V/workForm/FrmTSAV.cs
查看文件 @
d5f8f28
...
...
@@ -729,6 +729,8 @@ namespace TSA_V
{
TSAVBean
.
StopWork
();
}
//OpInfo op = OpInfo.GetOpInfo(BoardManager.CurrBoard);
//bool result = DB.db.AddHistory(op, out int id);
});
this
.
Close
();
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论