Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b4fc74eb
由
LN
编写于
2021-06-04 14:50:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
侧挡气缸和底部气缸增加禁用功能
1 个父辈
64e1a1b2
全部展开
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
58 行增加
和
13 行删除
Common/Setting_Init.cs
DeviceLibrary/manager/TSAVBean.cs
DeviceLibrary/manager/TSAVBean_Partial.cs
TSA-V/App.config
TSA-V/FrmDeviceConfig.Designer.cs
TSA-V/FrmDeviceConfig.cs
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/deviceDebug/FrmIoManager.cs
Common/Setting_Init.cs
查看文件 @
b4fc74e
...
@@ -165,5 +165,9 @@ namespace TSA_V.Common
...
@@ -165,5 +165,9 @@ namespace TSA_V.Common
/// 是否需要输入pcb条码
/// 是否需要输入pcb条码
/// </summary>
/// </summary>
public
static
string
NeedPCBCode
=
"NeedPCBCode"
;
public
static
string
NeedPCBCode
=
"NeedPCBCode"
;
public
static
string
DisableSideCylinder
=
"DisableSideCylinder"
;
public
static
string
DisableBottomCylinder
=
"DisableBottomCylinder"
;
}
}
}
}
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
b4fc74e
...
@@ -21,6 +21,10 @@ namespace TSA_V.DeviceLibrary
...
@@ -21,6 +21,10 @@ namespace TSA_V.DeviceLibrary
public
static
int
DefaultPType
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
DefaultPointType
);
public
static
int
DefaultPType
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
DefaultPointType
);
public
static
int
DefaultPSize
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
DefaultPointSize
);
public
static
int
DefaultPSize
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
DefaultPointSize
);
public
static
bool
DisableSideCylinder
=
false
;
public
static
bool
DisableBottomCylinder
=
false
;
private
static
string
warnMsg
=
""
;
private
static
string
warnMsg
=
""
;
public
static
string
WarnMsg
public
static
string
WarnMsg
{
{
...
@@ -66,6 +70,8 @@ namespace TSA_V.DeviceLibrary
...
@@ -66,6 +70,8 @@ namespace TSA_V.DeviceLibrary
public
static
string
LoadTSAV
()
public
static
string
LoadTSAV
()
{
{
LogUtil
.
info
(
Name
+
"开始加载电机配置。。"
);
LogUtil
.
info
(
Name
+
"开始加载电机配置。。"
);
DisableSideCylinder
=
ConfigAppSettings
.
GetBoolValue
(
Setting_Init
.
DisableSideCylinder
);
DisableBottomCylinder
=
ConfigAppSettings
.
GetBoolValue
(
Setting_Init
.
DisableBottomCylinder
);
if
(
workTimer
==
null
)
if
(
workTimer
==
null
)
{
{
workTimer
=
new
System
.
Timers
.
Timer
();
workTimer
=
new
System
.
Timers
.
Timer
();
...
@@ -570,7 +576,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -570,7 +576,7 @@ namespace TSA_V.DeviceLibrary
LogUtil
.
info
(
"StopMove,停止所有运动"
);
LogUtil
.
info
(
"StopMove,停止所有运动"
);
BottomCylinderDown
(
false
);
BottomCylinderDown
(
false
);
CylinderMove
(
IOManager
.
StopCylinder_Down
,
IOManager
.
StopCylinder_Up
,
false
);
CylinderMove
(
IOManager
.
StopCylinder_Down
,
IOManager
.
StopCylinder_Up
,
false
);
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
,
false
);
SideCyliderBack
(
false
);
Work
.
StopWork
();
Work
.
StopWork
();
LineStep
.
EndMove
();
LineStep
.
EndMove
();
...
...
DeviceLibrary/manager/TSAVBean_Partial.cs
查看文件 @
b4fc74e
...
@@ -55,7 +55,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -55,7 +55,7 @@ namespace TSA_V.DeviceLibrary
LogUtil
.
info
(
"开始流水线转动:挡停气缸下降,侧挡气缸后退,底部气缸下降"
);
LogUtil
.
info
(
"开始流水线转动:挡停气缸下降,侧挡气缸后退,底部气缸下降"
);
BottomCylinderDown
(
true
);
BottomCylinderDown
(
true
);
CylinderMove
(
IOManager
.
StopCylinder_Up
,
IOManager
.
StopCylinder_Down
,
true
);
CylinderMove
(
IOManager
.
StopCylinder_Up
,
IOManager
.
StopCylinder_Down
,
true
);
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
,
true
);
SideCyliderBack
(
true
);
}
}
else
else
{
{
...
@@ -97,7 +97,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -97,7 +97,7 @@ namespace TSA_V.DeviceLibrary
LogUtil
.
info
(
"检测到流水线前端信号:挡停气缸下降,侧挡气缸后退,底部气缸下降"
);
LogUtil
.
info
(
"检测到流水线前端信号:挡停气缸下降,侧挡气缸后退,底部气缸下降"
);
BottomCylinderDown
(
true
);
BottomCylinderDown
(
true
);
CylinderMove
(
IOManager
.
StopCylinder_Up
,
IOManager
.
StopCylinder_Down
,
true
);
CylinderMove
(
IOManager
.
StopCylinder_Up
,
IOManager
.
StopCylinder_Down
,
true
);
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
,
true
);
SideCyliderBack
(
true
);
}
}
else
else
{
{
...
@@ -191,7 +191,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -191,7 +191,7 @@ namespace TSA_V.DeviceLibrary
{
{
LineStep
.
NextMoveStep
(
LineStepBean
.
LS06_SideCylindeMove
);
LineStep
.
NextMoveStep
(
LineStepBean
.
LS06_SideCylindeMove
);
LineLog
(
"流水线转动:侧挡气缸前进"
);
LineLog
(
"流水线转动:侧挡气缸前进"
);
CylinderMove
(
IOManager
.
SideCylinder_Back
,
IOManager
.
SideCylinder_Forward
,
true
);
SideCyliderForward
(
true
);
}
}
else
if
(
LineStep
.
lineStep
.
Equals
(
LineStepBean
.
LS06_SideCylindeMove
))
else
if
(
LineStep
.
lineStep
.
Equals
(
LineStepBean
.
LS06_SideCylindeMove
))
{
{
...
@@ -222,7 +222,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -222,7 +222,7 @@ namespace TSA_V.DeviceLibrary
LineStep
.
NextMoveStep
(
LineStepBean
.
LS09_StopBack
);
LineStep
.
NextMoveStep
(
LineStepBean
.
LS09_StopBack
);
LineLog
(
"流水线转动:底部气缸下降,侧挡后退,工作统计"
);
LineLog
(
"流水线转动:底部气缸下降,侧挡后退,工作统计"
);
BottomCylinderDown
(
true
);
BottomCylinderDown
(
true
);
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
,
true
);
SideCyliderBack
(
true
);
}
}
else
if
(
LineStep
.
lineStep
.
Equals
(
LineStepBean
.
LS09_StopBack
))
else
if
(
LineStep
.
lineStep
.
Equals
(
LineStepBean
.
LS09_StopBack
))
{
{
...
@@ -338,6 +338,8 @@ namespace TSA_V.DeviceLibrary
...
@@ -338,6 +338,8 @@ namespace TSA_V.DeviceLibrary
public
static
void
BottomCylinderDown
(
bool
isWait
=
false
)
public
static
void
BottomCylinderDown
(
bool
isWait
=
false
)
{
{
if
(!
DisableBottomCylinder
)
{
if
(
isWait
)
if
(
isWait
)
{
{
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IOManager
.
BottomCylinder_Down1
,
IO_VALUE
.
HIGH
));
LineStep
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IOManager
.
BottomCylinder_Down1
,
IO_VALUE
.
HIGH
));
...
@@ -345,9 +347,11 @@ namespace TSA_V.DeviceLibrary
...
@@ -345,9 +347,11 @@ namespace TSA_V.DeviceLibrary
}
}
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Up
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Up
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Down
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Down
,
IO_VALUE
.
HIGH
);
}
}
public
static
void
BottomCylinderUp
(
bool
isWait
=
false
)
}
public
static
void
BottomCylinderUp
(
bool
isWait
=
false
)
{
if
(!
DisableBottomCylinder
)
{
{
if
(
isWait
)
if
(
isWait
)
{
{
...
@@ -357,6 +361,22 @@ namespace TSA_V.DeviceLibrary
...
@@ -357,6 +361,22 @@ namespace TSA_V.DeviceLibrary
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Down
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Down
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Up
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IOManager
.
BottomCylinder_Up
,
IO_VALUE
.
HIGH
);
}
}
}
public
static
void
SideCyliderForward
(
bool
isWait
=
false
)
{
if
(!
DisableSideCylinder
)
{
CylinderMove
(
IOManager
.
SideCylinder_Back
,
IOManager
.
SideCylinder_Forward
,
isWait
);
}
}
public
static
void
SideCyliderBack
(
bool
isWait
=
false
)
{
if
(!
DisableSideCylinder
)
{
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
,
isWait
);
}
}
public
static
void
CylinderMove
(
string
lowType
,
string
highType
,
bool
isWait
=
false
)
public
static
void
CylinderMove
(
string
lowType
,
string
highType
,
bool
isWait
=
false
)
{
{
...
@@ -372,7 +392,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -372,7 +392,7 @@ namespace TSA_V.DeviceLibrary
{
{
BottomCylinderDown
(
isWait
);
BottomCylinderDown
(
isWait
);
CylinderMove
(
IOManager
.
StopCylinder_Down
,
IOManager
.
StopCylinder_Up
,
isWait
);
CylinderMove
(
IOManager
.
StopCylinder_Down
,
IOManager
.
StopCylinder_Up
,
isWait
);
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
,
isWait
);
SideCyliderBack
(
isWait
);
}
}
}
}
/// <summary>
/// <summary>
...
...
TSA-V/App.config
查看文件 @
b4fc74e
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
<
add
key
=
"Line_WidthPosition"
value
=
""
/>
<
add
key
=
"Line_WidthPosition"
value
=
""
/>
<
add
key
=
"Server_Log_Open"
value
=
"0"
/>
<
add
key
=
"Server_Log_Open"
value
=
"0"
/>
<!--本地开放的
http
服务器端口号-->
<!--本地开放的
http
服务器端口号-->
<
!--<
add
key
=
"WebServiceAddr"
value
=
"http://localhost:4090/rest/api/v1/station/"
/>--
>
<
add
key
=
"WebServiceAddr"
value
=
"http://localhost:4090/rest/api/v1/station/"
/
>
<!--组装完成后上传数据的服务器地址-->
<!--组装完成后上传数据的服务器地址-->
<!--<
add
key
=
"DCSServerAddr"
value
=
"http://192.168.8.1:1007/DCS_Integration/Cartridge.asmx?op=CartridgeInfo"
/>-->
<!--<
add
key
=
"DCSServerAddr"
value
=
"http://192.168.8.1:1007/DCS_Integration/Cartridge.asmx?op=CartridgeInfo"
/>-->
<!--组装工作前,需要输入
pcb
板条码-->
<!--组装工作前,需要输入
pcb
板条码-->
...
...
TSA-V/FrmDeviceConfig.Designer.cs
查看文件 @
b4fc74e
此文件的差异被折叠,
点击展开。
TSA-V/FrmDeviceConfig.cs
查看文件 @
b4fc74e
...
@@ -43,7 +43,8 @@ namespace TSA_V
...
@@ -43,7 +43,8 @@ namespace TSA_V
{
{
LanguageProcess
();
LanguageProcess
();
this
.
chbISDebug
.
Checked
=
TSAVBean
.
IsDebug
;
this
.
chbISDebug
.
Checked
=
TSAVBean
.
IsDebug
;
this
.
chbDisBottomCylinder
.
Checked
=
TSAVBean
.
DisableBottomCylinder
;
this
.
chbDisSideCylinder
.
Checked
=
TSAVBean
.
DisableSideCylinder
;
this
.
txtKNDIP
.
Text
=
IOManager
.
KNDIP
.
ToString
();
this
.
txtKNDIP
.
Text
=
IOManager
.
KNDIP
.
ToString
();
this
.
txtKNDPort
.
Text
=
IOManager
.
KNDPort
.
ToString
();
this
.
txtKNDPort
.
Text
=
IOManager
.
KNDPort
.
ToString
();
LoadCom
();
LoadCom
();
...
@@ -106,10 +107,20 @@ namespace TSA_V
...
@@ -106,10 +107,20 @@ namespace TSA_V
bool
isDebug
=
chbISDebug
.
Checked
;
bool
isDebug
=
chbISDebug
.
Checked
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
IsDebug
,
isDebug
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
IsDebug
,
isDebug
);
TSAVBean
.
IsDebug
=
isDebug
;
TSAVBean
.
IsDebug
=
isDebug
;
bool
disBottom
=
chbDisBottomCylinder
.
Checked
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
DisableBottomCylinder
,
disBottom
);
TSAVBean
.
DisableBottomCylinder
=
disBottom
;
bool
disSide
=
chbDisSideCylinder
.
Checked
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
DisableSideCylinder
,
disSide
);
TSAVBean
.
DisableSideCylinder
=
disSide
;
string
server
=
txtAddr
.
Text
.
Trim
();
string
server
=
txtAddr
.
Text
.
Trim
();
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
DCSServerAddr
,
server
);
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
DCSServerAddr
,
server
);
MesUtil
.
serverAddress
=
server
;
MesUtil
.
serverAddress
=
server
;
LogUtil
.
info
(
"保存配置成功: 调试["
+
isDebug
+
"],地址["
+
server
+
"]
"
);
LogUtil
.
info
(
$
"保存配置成功: 调试{ isDebug },禁用底部气缸{disBottom},禁用侧挡气缸{disSide},地址{server}
"
);
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
SaveOk
,
"保存成功"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
SaveOk
,
"保存成功"
));
}
}
...
...
TSA-V/Properties/Resource.en-US.resx
查看文件 @
b4fc74e
...
@@ -2362,4 +2362,6 @@
...
@@ -2362,4 +2362,6 @@
<data name="ItemText_Disable" xml:space="preserve">
<data name="ItemText_Disable" xml:space="preserve">
<value>Disable</value>
<value>Disable</value>
</data>
</data>
<data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> Disable the side brake cylinder </value> </data>
<data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> Disable bottom cylinder </value> </data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
b4fc74e
...
@@ -2376,4 +2376,6 @@
...
@@ -2376,4 +2376,6 @@
<data name="ItemText_Disable" xml:space="preserve">
<data name="ItemText_Disable" xml:space="preserve">
<value>禁用</value>
<value>禁用</value>
</data>
</data>
<data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> 禁用侧挡气缸 </value> </data>
<data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> 禁用底部气缸 </value> </data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/deviceDebug/FrmIoManager.cs
查看文件 @
b4fc74e
...
@@ -323,12 +323,12 @@ namespace TSA_V
...
@@ -323,12 +323,12 @@ namespace TSA_V
private
void
btnSideForward_Click
(
object
sender
,
EventArgs
e
)
private
void
btnSideForward_Click
(
object
sender
,
EventArgs
e
)
{
{
TSAVBean
.
CylinderMove
(
IOManager
.
SideCylinder_Back
,
IOManager
.
SideCylinder_Forward
);
TSAVBean
.
SideCyliderForward
(
);
}
}
private
void
btnSideBack_Click
(
object
sender
,
EventArgs
e
)
private
void
btnSideBack_Click
(
object
sender
,
EventArgs
e
)
{
{
TSAVBean
.
CylinderMove
(
IOManager
.
SideCylinder_Forward
,
IOManager
.
SideCylinder_Back
);
TSAVBean
.
SideCyliderBack
(
);
}
}
private
void
btnBottomUp_Click
(
object
sender
,
EventArgs
e
)
private
void
btnBottomUp_Click
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论