Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1053_DualSISO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2efb3829
由
刘韬
编写于
2023-03-15 15:47:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
c3ec9f4a
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
314 行增加
和
128 行删除
Common/CodeResourceControl.cs
Common/Common.csproj
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/packages.config
DeviceLibrary/theMachine/JobList.cs
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
DeviceLibrary/theMachine/MoveInfo.cs
DeviceLibrary/theMachine/Store/StoreMachine.cs
DeviceLibrary/theMachine/Store/StoreMachine_Store.cs
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
DeviceLibrary/userControl/AxisMoveControl.cs
DeviceLibrary/userControl/FixtureSizeConfigControl.cs
DeviceLibrary/userControl/FixtureSizeConfigControl.designer.cs
DeviceLibrary/userControl/ToucDownBtn.cs
LoadCVSLibrary/LoadCSVLibrary.csproj
TheMachine/App.config
TheMachine/AxisControl.Designer.cs
TheMachine/AxisControl.cs
TheMachine/Form1.cs
TheMachine/Properties/Resources.Designer.cs
TheMachine/Properties/Settings.Designer.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/TheMachine.csproj
TheMachine/UC/FrmPassCheck.cs
Common/CodeResourceControl.cs
查看文件 @
2efb382
...
@@ -296,13 +296,12 @@ namespace OnlineStore
...
@@ -296,13 +296,12 @@ namespace OnlineStore
}
}
private
static
void
PreControlLanaguage
(
Control
partentControl
,
string
class
Name
)
private
static
void
PreControlLanaguage
(
Control
partentControl
,
string
class
Name
)
{
{
string
newStr
=
""
;
Con_GetTxt
(
partentControl
,
out
string
title
);
//Con_GetTxt(partentControl, out string title);
string
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
partentControl
.
Name
),
title
);
//string newStr = GetString(GetTextIdStr(className, partentControl.Name), title);
if
(!
newStr
.
Equals
(
""
))
//if (!newStr.Equals(""))
{
//{
Con_SetTxt
(
partentControl
,
newStr
.
Replace
(
"\\n"
,
"\n"
));
//Con_SetTxt(partentControl, newStr.Replace("\\n", "\n"));
}
//}
foreach
(
Control
con
in
partentControl
.
Controls
)
foreach
(
Control
con
in
partentControl
.
Controls
)
{
{
string
txt
=
""
;
string
txt
=
""
;
...
...
Common/Common.csproj
查看文件 @
2efb382
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>MyCommon</AssemblyName>
<AssemblyName>MyCommon</AssemblyName>
<TargetFrameworkVersion>v4.6.
1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.
2
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFrameworkProfile />
</PropertyGroup>
</PropertyGroup>
...
...
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
2efb382
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceLibrary</RootNamespace>
<RootNamespace>DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName>
<AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.6.
1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.
2
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<TargetFrameworkProfile />
...
@@ -162,6 +162,9 @@
...
@@ -162,6 +162,9 @@
<Compile Include="userControl\FixtureSizeConfigControl.designer.cs">
<Compile Include="userControl\FixtureSizeConfigControl.designer.cs">
<DependentUpon>FixtureSizeConfigControl.cs</DependentUpon>
<DependentUpon>FixtureSizeConfigControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="userControl\ToucDownBtn.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<EmbeddedResource Include="userControl\AxisMoveControl.resx">
<EmbeddedResource Include="userControl\AxisMoveControl.resx">
...
...
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
2efb382
using
OnlineStore.Common
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -47,34 +48,28 @@ namespace DeviceLibrary
...
@@ -47,34 +48,28 @@ namespace DeviceLibrary
openretry
++;
openretry
++;
{
{
Msg
+=
string
.
Format
(
"第{0}次尝试打开轴:{1}"
,
openretry
,
Config
.
Explain
);
Msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0032.1bf30741"
,
"第{0}次尝试打开轴:{1}"
)
,
openretry
,
Config
.
Explain
);
if
(
AxisManager
.
GetBusyStatus
(
portName
,
slvAddr
)
==
1
)
if
(
AxisManager
.
GetBusyStatus
(
portName
,
slvAddr
)
==
1
)
{
{
AxisManager
.
SuddenStop
(
portName
,
slvAddr
);
AxisManager
.
SuddenStop
(
portName
,
slvAddr
);
Msg
+=
string
.
Format
(
"...伺服忙碌,急停{0}次"
,
openretry
);
Msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0033.814c87d5"
,
"...伺服忙碌,急停{0}次"
)
,
openretry
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
}
}
//if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0)
//{
// AxisManager.AlarmClear(portName, slvAddr);
// Msg += string.Format("...尝试清除报警第(0)次", openretry);
// Thread.Sleep(100);
//}
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
{
{
Msg
+=
"...
使能成功"
;
Msg
+=
"...
"
+
crc
.
GetString
(
"Res0034.c054671f"
,
"使能成功"
)
;
openretry
=
0
;
openretry
=
0
;
return
true
;
return
true
;
}
}
else
else
Msg
+=
"...
尝试使能失败"
;
Msg
+=
"...
"
+
crc
.
GetString
(
"Res0035.94b55bdf"
,
"尝试使能失败"
)
;
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
if
(
openretry
<
5
)
if
(
openretry
<
5
)
Msg
=
"伺服连接中
..."
;
Msg
=
crc
.
GetString
(
"Res0036.abdd7b6b"
,
"伺服连接中"
)
+
"
..."
;
}
}
return
false
;
return
false
;
}
}
...
@@ -107,7 +102,7 @@ namespace DeviceLibrary
...
@@ -107,7 +102,7 @@ namespace DeviceLibrary
else
else
{
{
AxisManager
.
ServoOff
(
portName
,
slvAddr
);
AxisManager
.
ServoOff
(
portName
,
slvAddr
);
msg
=
"打开轴"
+
Config
.
Explain
+
"失败 "
;
msg
=
crc
.
GetString
(
"Res0037.2bf5c941"
,
"打开轴"
)
+
Config
.
Explain
+
crc
.
GetString
(
"Res0038.33d2a704"
,
"失败 "
)
;
LogUtil
.
info
(
AxisName
+
msg
);
LogUtil
.
info
(
AxisName
+
msg
);
return
false
;
return
false
;
}
}
...
@@ -213,7 +208,7 @@ namespace DeviceLibrary
...
@@ -213,7 +208,7 @@ namespace DeviceLibrary
int
isAlarm
=
AxisManager
.
GetAlarmStatus
(
deviceName
,
axisNo
);
int
isAlarm
=
AxisManager
.
GetAlarmStatus
(
deviceName
,
axisNo
);
if
(
isAlarm
.
Equals
(
1
))
if
(
isAlarm
.
Equals
(
1
))
{
{
clearMsg
=
"清理报警
,"
;
clearMsg
=
crc
.
GetString
(
"Res0039.a6087377"
,
"清理报警"
)
+
"
,"
;
AxisManager
.
AlarmClear
(
deviceName
,
axisNo
);
AxisManager
.
AlarmClear
(
deviceName
,
axisNo
);
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
AxisManager
.
ServoOn
(
deviceName
,
axisNo
);
AxisManager
.
ServoOn
(
deviceName
,
axisNo
);
...
@@ -225,7 +220,7 @@ namespace DeviceLibrary
...
@@ -225,7 +220,7 @@ namespace DeviceLibrary
AxisManager
.
SuddenStop
(
axis
.
DeviceName
,
axis
.
GetAxisValue
());
AxisManager
.
SuddenStop
(
axis
.
DeviceName
,
axis
.
GetAxisValue
());
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
}
}
MoveInfo
.
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);
...
@@ -234,7 +229,7 @@ namespace DeviceLibrary
...
@@ -234,7 +229,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
msg
=
$
"{MoveInfo.Name} {MoveInfo.MoveStep} {axis.DisplayStr},
目标位置{targetPosition},当前位置{outCount},误差过大,需要报警"
;
msg
=
$
"{MoveInfo.Name} {MoveInfo.MoveStep} {axis.DisplayStr},
"
+
crc
.
GetString
(
"Res0040.84ab6e6f"
,
"目标位置"
)
+
$
"{targetPosition},"
+
crc
.
GetString
(
"Res0041.5eac11b4"
,
"当前位置"
)
+
$
"{outCount},"
+
crc
.
GetString
(
"Res0042.53ce14b2"
,
"误差过大,需要报警"
)
;
MoveInfo
.
error
(
msg
);
MoveInfo
.
error
(
msg
);
}
}
}
}
...
@@ -257,13 +252,13 @@ namespace DeviceLibrary
...
@@ -257,13 +252,13 @@ namespace DeviceLibrary
var
HomeAddSpeed
=
axis
.
HomeAddSpeed
>
0
?
axis
.
HomeAddSpeed
:
axis
.
HomeHighSpeed
*
5
;
var
HomeAddSpeed
=
axis
.
HomeAddSpeed
>
0
?
axis
.
HomeAddSpeed
:
axis
.
HomeHighSpeed
*
5
;
AxisManager
.
HomeMove
(
axis
.
DeviceName
,
axis
.
GetAxisValue
(),
axis
.
HomeHighSpeed
,
HomeLowSpeed
,
HomeAddSpeed
);
AxisManager
.
HomeMove
(
axis
.
DeviceName
,
axis
.
GetAxisValue
(),
axis
.
HomeHighSpeed
,
HomeLowSpeed
,
HomeAddSpeed
);
MoveInfo
.
log
(
axis
.
DisplayStr
+
",返回原点失败,重新回原"
);
MoveInfo
.
log
(
axis
.
DisplayStr
+
",
"
+
"
返回原点失败,重新回原"
);
MoveInfo
.
CanWhileCount
--;
MoveInfo
.
CanWhileCount
--;
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
}
}
else
if
(
MoveInfo
.
CanWhileCount
<=
0
)
else
if
(
MoveInfo
.
CanWhileCount
<=
0
)
{
{
msg
=
axis
.
DisplayStr
+
",
返回原点失败"
;
msg
=
axis
.
DisplayStr
+
",
"
+
crc
.
GetString
(
"Res0043.fdfe522c"
,
"返回原点失败"
)
;
}
}
return
false
;
return
false
;
}
}
...
@@ -452,11 +447,11 @@ namespace DeviceLibrary
...
@@ -452,11 +447,11 @@ namespace DeviceLibrary
Thread
.
Sleep
(
200
);
Thread
.
Sleep
(
200
);
if
(
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
!=
0
)
if
(
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
!=
0
)
{
{
msg
+=
string
.
Format
(
"轴(0)存在报警,清除失败"
,
axis
.
Config
.
Explain
);
msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0044.95840864"
,
"轴(0)存在报警,清除失败"
)
,
axis
.
Config
.
Explain
);
isok
=
false
;
isok
=
false
;
}
}
else
else
msg
+=
string
.
Format
(
"轴(0)存在报警,清除成功"
,
axis
.
Config
.
Explain
);
msg
+=
string
.
Format
(
crc
.
GetString
(
"Res0045.b5876296"
,
"轴(0)存在报警,清除成功"
)
,
axis
.
Config
.
Explain
);
}
}
}
}
Thread
.
Sleep
(
50
);
Thread
.
Sleep
(
50
);
...
@@ -481,4 +476,4 @@ namespace DeviceLibrary
...
@@ -481,4 +476,4 @@ namespace DeviceLibrary
}
}
}
}
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
2efb382
...
@@ -70,16 +70,29 @@ namespace DeviceLibrary
...
@@ -70,16 +70,29 @@ namespace DeviceLibrary
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
{
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
{
if
(
msg
==
null
)
if
(
msg
==
null
)
return
;
return
;
WarnMsg
=
string
.
Join
(
"
,
"
,
msg
.
Select
(
x
=>
WarnMsg
=
string
.
Join
(
"
\r\n
"
,
msg
.
Select
(
x
=>
{
{
if
(
x
.
msgLevel
==
MsgLevel
.
warning
||
x
.
msgLevel
==
MsgLevel
.
alarm
)
if
(
x
.
msgLevel
==
MsgLevel
.
warning
||
x
.
msgLevel
==
MsgLevel
.
alarm
)
{
{
return
x
.
msgtxt
;
return
GetMsgPrefix
(
x
.
msgLevel
)
+
x
.
msgtxt
;
}
}
return
null
;
return
null
;
}
}
).
Where
(
x
=>!
string
.
IsNullOrEmpty
(
x
)));
).
Where
(
x
=>!
string
.
IsNullOrEmpty
(
x
)));
}
}
string
GetMsgPrefix
(
MsgLevel
msgLevel
)
{
switch
(
msgLevel
)
{
case
MsgLevel
.
info
:
return
"I="
;
case
MsgLevel
.
warning
:
return
"W="
;
case
MsgLevel
.
alarm
:
return
"A="
;
}
return
""
;
}
public
void
SendInStoreRequest
(
string
[]
codelist
,
ReelParam
reel
,
bool
printlog
=
false
)
{
public
void
SendInStoreRequest
(
string
[]
codelist
,
ReelParam
reel
,
bool
printlog
=
false
)
{
if
(
Machine
.
AutoInOutTestMode
)
if
(
Machine
.
AutoInOutTestMode
)
...
@@ -360,9 +373,11 @@ namespace DeviceLibrary
...
@@ -360,9 +373,11 @@ namespace DeviceLibrary
}
}
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
plateH
>
56
)
if
(
plateH
>
56
)
plateH
=
56
;
plateH
=
56
;
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
,
plateW
,
plateH
);
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
,
plateW
,
plateH
);
if
(
InStoreEvent
.
Invoke
(
inStoreJob
,
false
,
""
))
if
(
InStoreEvent
.
Invoke
(
inStoreJob
,
false
,
""
))
{
{
WarnMsg
=
""
;
WarnMsg
=
""
;
...
@@ -458,7 +473,21 @@ namespace DeviceLibrary
...
@@ -458,7 +473,21 @@ namespace DeviceLibrary
}
}
else
else
{
{
if
(
plateH
==
0
)
{
plateH
=
position
.
BagHigh
;
plateW
=
position
.
BagWidth
;
}
var
ngReel
=
false
;
var
ngMsg
=
""
;
if
(
data
.
ContainsKey
(
"ngReel"
)
&&
data
[
"ngReel"
].
ToLower
()
==
"true"
)
{
ngReel
=
true
;
data
.
TryGetValue
(
"ngMsg"
,
out
ngMsg
);
}
JobInfo
outStoreJob
=
new
JobInfo
(
code
,
posId
,
plateW
,
plateH
);
JobInfo
outStoreJob
=
new
JobInfo
(
code
,
posId
,
plateW
,
plateH
);
outStoreJob
.
isNG
=
ngReel
;
outStoreJob
.
NgMsg
=
ngMsg
;
OutStoreEvent
.
Invoke
(
outStoreJob
);
OutStoreEvent
.
Invoke
(
outStoreJob
);
}
}
}
}
...
...
DeviceLibrary/packages.config
查看文件 @
2efb382
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
<
package
id
=
"System.Net.NameResolution"
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.Security"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Net.Sockets"
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.Extensions"
version
=
"4.3.0"
targetFramework
=
"net461"
requireReinstallation
=
"true"
/>
<
package
id
=
"System.Runtime.InteropServices"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Runtime.InteropServices"
version
=
"4.3.0"
targetFramework
=
"net461"
requireReinstallation
=
"true"
/>
<
package
id
=
"System.Security.Cryptography.Algorithms"
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.Encoding"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Security.Cryptography.Primitives"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
<
package
id
=
"System.Security.Cryptography.Primitives"
version
=
"4.3.0"
targetFramework
=
"net461"
/>
...
...
DeviceLibrary/theMachine/JobList.cs
查看文件 @
2efb382
...
@@ -102,10 +102,12 @@ namespace DeviceLibrary
...
@@ -102,10 +102,12 @@ namespace DeviceLibrary
/// 料盘高
/// 料盘高
/// </summary>
/// </summary>
public
int
plateH
{
get
;
set
;
}
public
int
plateH
{
get
;
set
;
}
public
bool
isNG
{
get
;
set
;
}
public
string
NgMsg
{
get
;
set
;
}
public
string
ToStr
()
public
string
ToStr
()
{
{
return
"TrayCode【"
+
TrayCode
+
"】,WareNum=【"
+
WareNum
+
"】,PosId=【"
+
PosId
+
"】,plateW=【"
+
plateW
+
"】,plateH=【"
+
plateH
+
"】"
;
return
"TrayCode【"
+
TrayCode
+
"】,WareNum=【"
+
WareNum
+
"】,PosId=【"
+
PosId
+
"】,plateW=【"
+
plateW
+
"】,plateH=【"
+
plateH
+
"】
,isng=【"
+
isNG
+
"】,nsmsg=【"
+
NgMsg
+
"】
"
;
}
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
查看文件 @
2efb382
using
CodeLibrary
;
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
@@ -18,6 +18,7 @@ namespace DeviceLibrary
...
@@ -18,6 +18,7 @@ namespace DeviceLibrary
{
{
airprocess
();
airprocess
();
}
}
DateTime
LastHumiCheckTime
=
DateTime
.
Now
.
AddHours
(
2
);
void
airprocess
()
void
airprocess
()
{
{
//var temp = HumitureController.QueryData();
//var temp = HumitureController.QueryData();
...
@@ -28,6 +29,12 @@ namespace DeviceLibrary
...
@@ -28,6 +29,12 @@ namespace DeviceLibrary
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var
humiNeedStart
=
Current_Humidity
>
RobotManage
.
rightMachine
.
ServerCM
.
Max_Humidity
-
Setting_Init
.
Device_HumidityStartOffser
;
var
humiNeedStart
=
Current_Humidity
>
RobotManage
.
rightMachine
.
ServerCM
.
Max_Humidity
-
Setting_Init
.
Device_HumidityStartOffser
;
var
humiNeedStop
=
Current_Humidity
<
RobotManage
.
rightMachine
.
ServerCM
.
Max_Humidity
-
Setting_Init
.
Device_HumidityEndOffser
;
var
humiNeedStop
=
Current_Humidity
<
RobotManage
.
rightMachine
.
ServerCM
.
Max_Humidity
-
Setting_Init
.
Device_HumidityEndOffser
;
if
(
Current_Humidity
<=
RobotManage
.
rightMachine
.
ServerCM
.
Max_Humidity
)
LastHumiCheckTime
=
DateTime
.
Now
;
else
if
((
DateTime
.
Now
-
LastHumiCheckTime
).
TotalSeconds
>
30
)
{
RobotManage
.
rightMachine
.
Msg
.
add
(
crc
.
GetString
(
"Res0030.70dccffd"
,
"温湿度超限"
),
MsgLevel
.
alarm
);
}
if
(
humiNeedStart
&&
IOValue
(
IO_Type
.
NitrogenValve
,
Config
).
Equals
(
IO_VALUE
.
LOW
))
if
(
humiNeedStart
&&
IOValue
(
IO_Type
.
NitrogenValve
,
Config
).
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -41,4 +48,4 @@ namespace DeviceLibrary
...
@@ -41,4 +48,4 @@ namespace DeviceLibrary
}
}
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
查看文件 @
2efb382
...
@@ -83,8 +83,8 @@ namespace DeviceLibrary
...
@@ -83,8 +83,8 @@ namespace DeviceLibrary
MachineLedStateName
[
MachineLedStateE
.
SystemPause
]
=
crc
.
GetString
(
"ledstate_SystemPause"
,
"暂停"
);
MachineLedStateName
[
MachineLedStateE
.
SystemPause
]
=
crc
.
GetString
(
"ledstate_SystemPause"
,
"暂停"
);
MachineLedState
.
Add
(
MachineLedStateE
.
SystemPause
,
nls
(
LedState
.
blink
,
LedState
.
off
,
LedState
.
blink
));
MachineLedState
.
Add
(
MachineLedStateE
.
SystemPause
,
nls
(
LedState
.
blink
,
LedState
.
off
,
LedState
.
blink
));
//温湿度超限30分钟. 红闪,黄闪
//温湿度超限30分钟. 红闪,黄闪
//MachineLedStateName[MachineLedStateE.THoutRangeOver30m] = "温湿度超限30分钟"
;
MachineLedStateName
[
MachineLedStateE
.
THoutRangeOver30m
]
=
crc
.
GetString
(
"Res0031.cbc9a6e9"
,
"温湿度超限30分钟"
)
;
//
MachineLedState.Add(MachineLedStateE.THoutRangeOver30m, nls(LedState.blink, LedState.blink, LedState.none));
MachineLedState
.
Add
(
MachineLedStateE
.
THoutRangeOver30m
,
nls
(
LedState
.
blink
,
LedState
.
blink
,
LedState
.
none
));
//温湿度超限 绿闪黄闪
//温湿度超限 绿闪黄闪
//MachineLedStateName[MachineLedStateE.THoutRange] = "温湿度超限";
//MachineLedStateName[MachineLedStateE.THoutRange] = "温湿度超限";
//MachineLedState.Add(MachineLedStateE.THoutRange, nls(LedState.none, LedState.blink, LedState.blink));
//MachineLedState.Add(MachineLedStateE.THoutRange, nls(LedState.none, LedState.blink, LedState.blink));
...
@@ -140,6 +140,10 @@ namespace DeviceLibrary
...
@@ -140,6 +140,10 @@ namespace DeviceLibrary
{
{
ProcessLefCfg
(
MachineLedStateE
.
SystemPause
);
ProcessLefCfg
(
MachineLedStateE
.
SystemPause
);
}
}
if
((
DateTime
.
Now
-
LastHumiCheckTime
).
TotalSeconds
>
30
)
{
ProcessLefCfg
(
MachineLedStateE
.
THoutRangeOver30m
);
}
}
}
else
if
(
RobotManage
.
Stores
.
Sum
(
x
=>
x
.
runStatus
==
RunStatus
.
Stop
?
1
:
0
)
>
0
)
else
if
(
RobotManage
.
Stores
.
Sum
(
x
=>
x
.
runStatus
==
RunStatus
.
Stop
?
1
:
0
)
>
0
)
{
{
...
...
DeviceLibrary/theMachine/MoveInfo.cs
查看文件 @
2efb382
using
OnlineStore.Common
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -243,40 +244,36 @@ namespace DeviceLibrary
...
@@ -243,40 +244,36 @@ namespace DeviceLibrary
{
{
if
(
IsHomeMove
)
if
(
IsHomeMove
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】原点返回"
;
return
crc
.
GetString
(
"Res0021.60c85b4b"
,
"轴"
)
+
"【"
+
AxisInfo
.
DisplayStr
+
"】"
+
crc
.
GetString
(
"AxisMoveControl_groupAxis_panel1_btnAxisReturnHome_Text"
,
"原点返回"
)
;
}
}
else
else
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】绝对运动,目标位置
【"
+
TargetPosition
+
"】"
;
return
crc
.
GetString
(
"Res0021.60c85b4b"
,
"轴"
)
+
"【"
+
AxisInfo
.
DisplayStr
+
"】"
+
crc
.
GetString
(
"Res0022.0c33436f"
,
"绝对运动,目标位置"
)
+
"
【"
+
TargetPosition
+
"】"
;
}
}
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W002_IOValue
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W002_IOValue
))
{
{
return
"等待
【"
+
IoType
+
"】=【"
+
IoValue
+
"】"
;
return
crc
.
GetString
(
"Res0023.87979227"
,
"等待"
)
+
"
【"
+
IoType
+
"】=【"
+
IoValue
+
"】"
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W003_Time
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W003_Time
))
{
{
return
"时间等待:【"
+
TimeMSeconds
+
"】毫秒"
;
return
crc
.
GetString
(
"Res0024.d7647f48"
,
"时间等待"
)
+
":【"
+
TimeMSeconds
+
"】"
+
crc
.
GetString
(
"Res0025.21157cbf"
,
"毫秒"
);
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W005_ShuoKe
))
{
return
"硕科电机目标位置:【"
+
TargetPosition
+
"】 "
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W006_AxisOrg
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W006_AxisOrg
))
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】
"
;
return
crc
.
GetString
(
"Res0021.60c85b4b"
,
"轴"
)
+
"【"
+
AxisInfo
.
DisplayStr
+
"】"
+
crc
.
GetString
(
"Res0026.3802ba42"
,
"ORG信号"
)
+
":【"
+
IoValue
+
"】
"
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W007_ReelHeight
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W007_ReelHeight
))
{
{
return
"料盘高度【"
+
TargetPosition
+
"】
"
;
return
crc
.
GetString
(
"Res0027.f4a8d691"
,
"料盘高度"
)
+
"【"
+
TargetPosition
+
"】
"
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W008_BatchAxis
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W008_BatchAxis
))
{
{
return
"批量轴上升到上料点"
;
return
crc
.
GetString
(
"Res0028.84e7c741"
,
"批量轴上升到上料点"
)
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
{
{
return
"扫码完成"
;
return
crc
.
GetString
(
"Res0029.ed4de1c6"
,
"扫码完成"
)
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W013_Action
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W013_Action
))
{
{
...
@@ -284,7 +281,7 @@ namespace DeviceLibrary
...
@@ -284,7 +281,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
return
"Wait
位置类型:Wait
Type=【"
+
WaitType
+
"】"
;
return
"WaitType=【"
+
WaitType
+
"】"
;
}
}
}
}
/// <summary>
/// <summary>
...
@@ -413,4 +410,4 @@ namespace DeviceLibrary
...
@@ -413,4 +410,4 @@ namespace DeviceLibrary
///// </summary>
///// </summary>
//CheckFixture=6,
//CheckFixture=6,
}
}
}
}
\ No newline at end of file
\ No newline at end of file
DeviceLibrary/theMachine/Store/StoreMachine.cs
查看文件 @
2efb382
...
@@ -70,7 +70,7 @@ namespace DeviceLibrary
...
@@ -70,7 +70,7 @@ namespace DeviceLibrary
internal
AxisBean
Middle_Axis
;
internal
AxisBean
Middle_Axis
;
public
AxisBean
UpDown_Axis
;
public
AxisBean
UpDown_Axis
;
internal
AxisBean
InOut_Axis
;
internal
AxisBean
InOut_Axis
;
internal
AxisBean
Comp_Axis
;
public
AxisBean
Comp_Axis
;
internal
AxisBean
Door_Axis
;
internal
AxisBean
Door_Axis
;
...
@@ -452,6 +452,8 @@ namespace DeviceLibrary
...
@@ -452,6 +452,8 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
PlateH
=
ConfigHelper
.
Config
.
Get
<
int
>(
$
"Runtime_{MachineSide}_PlateH"
);
StoreMoveInfo
.
MoveParam
.
PlateH
=
ConfigHelper
.
Config
.
Get
<
int
>(
$
"Runtime_{MachineSide}_PlateH"
);
StoreMoveInfo
.
MoveParam
.
PlateW
=
ConfigHelper
.
Config
.
Get
<
int
>(
$
"Runtime_{MachineSide}_PlateW"
);
StoreMoveInfo
.
MoveParam
.
PlateW
=
ConfigHelper
.
Config
.
Get
<
int
>(
$
"Runtime_{MachineSide}_PlateW"
);
StoreMoveInfo
.
MoveParam
.
WareCode
=
ConfigHelper
.
Config
.
Get
(
$
"Runtime_{MachineSide}_WareCode"
);
StoreMoveInfo
.
MoveParam
.
WareCode
=
ConfigHelper
.
Config
.
Get
(
$
"Runtime_{MachineSide}_WareCode"
);
StoreMoveInfo
.
MoveParam
.
IsNg
=
ConfigHelper
.
Config
.
Get
<
bool
>(
$
"Runtime_{MachineSide}_IsNg"
);
StoreMoveInfo
.
MoveParam
.
NgMsg
=
ConfigHelper
.
Config
.
Get
(
$
"Runtime_{MachineSide}_NgMsg"
);
if
(
StoreMoveInfo
.
MoveParam
.
PlateH
==
0
)
if
(
StoreMoveInfo
.
MoveParam
.
PlateH
==
0
)
{
{
if
(
TrayCheck_Fixture
)
if
(
TrayCheck_Fixture
)
...
@@ -534,9 +536,10 @@ namespace DeviceLibrary
...
@@ -534,9 +536,10 @@ namespace DeviceLibrary
if
(!
IgnoreSafecheck
)
// && IOValue(IO_Type.NGDoor_Open).Equals(IO_VALUE.HIGH))
if
(!
IgnoreSafecheck
)
// && IOValue(IO_Type.NGDoor_Open).Equals(IO_VALUE.HIGH))
{
{
ok
=
false
;
ok
=
false
;
DeviceSuddenStop
();
UserPause
=
true
;
UserPause
=
true
;
}
}
Msg
.
add
(
crc
.
GetString
(
"Res0147"
,
"后维护
被打开"
)
+
(
ok
?
ignorestring
:
""
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
"Res0147"
,
"后维护
门被打开"
)
+
(
ok
?
ignorestring
:
""
),
MsgLevel
.
alarm
);
}
}
if
(!
lastSafeCheckStatus
&&
ok
)
if
(!
lastSafeCheckStatus
&&
ok
)
{
{
...
...
DeviceLibrary/theMachine/Store/StoreMachine_Store.cs
查看文件 @
2efb382
...
@@ -116,6 +116,8 @@ namespace DeviceLibrary
...
@@ -116,6 +116,8 @@ namespace DeviceLibrary
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
.
MoveParam
.
IsNg
=
jobInfo
.
isNG
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
jobInfo
.
NgMsg
;
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_IsInStore"
,
false
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_IsInStore"
,
false
);
...
@@ -123,6 +125,8 @@ namespace DeviceLibrary
...
@@ -123,6 +125,8 @@ namespace DeviceLibrary
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_PlateH"
,
StoreMoveInfo
.
MoveParam
.
PlateH
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_PlateH"
,
StoreMoveInfo
.
MoveParam
.
PlateH
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_PlateW"
,
StoreMoveInfo
.
MoveParam
.
PlateW
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_PlateW"
,
StoreMoveInfo
.
MoveParam
.
PlateW
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_WareCode"
,
StoreMoveInfo
.
MoveParam
.
WareCode
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_WareCode"
,
StoreMoveInfo
.
MoveParam
.
WareCode
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_IsNg"
,
StoreMoveInfo
.
MoveParam
.
IsNg
);
ConfigHelper
.
Config
.
Set
(
$
"Runtime_{MachineSide}_NgMsg"
,
StoreMoveInfo
.
MoveParam
.
NgMsg
);
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
return
;
return
;
}
}
...
...
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
查看文件 @
2efb382
...
@@ -76,10 +76,10 @@
...
@@ -76,10 +76,10 @@
this
.
btnAxisStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAxisStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAxisReturnHome
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAxisReturnHome
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cmbAxis
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cmbAxis
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnDelMove
=
new
System
.
Windows
.
Forms
.
Butto
n
();
this
.
btnDelMove
=
new
ToucDownBt
n
();
this
.
btnOpenAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOpenAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCloseAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCloseAxis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAddMove
=
new
System
.
Windows
.
Forms
.
Butto
n
();
this
.
btnAddMove
=
new
ToucDownBt
n
();
this
.
txtASpeed
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtASpeed
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label47
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label47
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -952,8 +952,8 @@
...
@@ -952,8 +952,8 @@
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
TextBox
txtServoStatue
;
private
System
.
Windows
.
Forms
.
TextBox
txtServoStatue
;
private
System
.
Windows
.
Forms
.
Butto
n
btnDelMove
;
private
ToucDownBt
n
btnDelMove
;
private
System
.
Windows
.
Forms
.
Butto
n
btnAddMove
;
private
ToucDownBt
n
btnAddMove
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
ComboBox
comjSpeed
;
private
System
.
Windows
.
Forms
.
ComboBox
comjSpeed
;
...
...
DeviceLibrary/userControl/AxisMoveControl.cs
查看文件 @
2efb382
...
@@ -28,7 +28,8 @@ namespace DeviceLibrary
...
@@ -28,7 +28,8 @@ namespace DeviceLibrary
InitializeComponent
();
InitializeComponent
();
crc
.
OpenResourceLog
=
true
;
crc
.
OpenResourceLog
=
true
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
CurrLanguage
=
Setting_Init
.
Device_Default_Language
;
if
(!
string
.
IsNullOrEmpty
(
Setting_Init
.
Device_Default_Language
))
crc
.
CurrLanguage
=
Setting_Init
.
Device_Default_Language
;
}
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
...
...
DeviceLibrary/userControl/FixtureSizeConfigControl.cs
查看文件 @
2efb382
...
@@ -65,6 +65,11 @@ namespace DeviceLibrary
...
@@ -65,6 +65,11 @@ namespace DeviceLibrary
RefreshList
();
RefreshList
();
}
}
private
void
btn_testcomp_Click
(
object
sender
,
EventArgs
e
)
{
}
}
}
public
class
FixtureConfig
{
public
class
FixtureConfig
{
public
string
StartCode
;
public
string
StartCode
;
...
...
DeviceLibrary/userControl/FixtureSizeConfigControl.designer.cs
查看文件 @
2efb382
...
@@ -148,6 +148,7 @@ namespace DeviceLibrary
...
@@ -148,6 +148,7 @@ namespace DeviceLibrary
this
.
checkBox_useedremove
.
TabIndex
=
5
;
this
.
checkBox_useedremove
.
TabIndex
=
5
;
this
.
checkBox_useedremove
.
Text
=
"弃用条码"
;
this
.
checkBox_useedremove
.
Text
=
"弃用条码"
;
this
.
checkBox_useedremove
.
UseVisualStyleBackColor
=
true
;
this
.
checkBox_useedremove
.
UseVisualStyleBackColor
=
true
;
this
.
checkBox_useedremove
.
Visible
=
false
;
//
//
// button2
// button2
//
//
...
...
DeviceLibrary/userControl/ToucDownBtn.cs
0 → 100644
查看文件 @
2efb382
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Security.Permissions
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
class
ToucDownBtn
:
System
.
Windows
.
Forms
.
Button
{
public
const
int
WM_POINTERDOWN
=
0x246
;
public
const
int
WM_POINTERUP
=
0x247
;
[
PermissionSet
(
SecurityAction
.
Demand
,
Name
=
"FullTrust"
)]
protected
override
void
WndProc
(
ref
Message
m
)
{
switch
(
m
.
Msg
)
{
case
WM_POINTERDOWN
:
{
MouseEventArgs
args
=
new
MouseEventArgs
(
MouseButtons
.
Left
,
1
,
1
,
1
,
0
);
OnMouseDown
(
args
);
//Console.WriteLine("WM_POINTERDOWN");
break
;
}
case
WM_POINTERUP
:
{
MouseEventArgs
args
=
new
MouseEventArgs
(
MouseButtons
.
Left
,
1
,
1
,
1
,
0
);
OnMouseUp
(
args
);
//Console.WriteLine("WM_POINTERUP");
break
;
}
}
base
.
WndProc
(
ref
m
);
}
}
LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
2efb382
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.6.
1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.
2
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFrameworkProfile />
</PropertyGroup>
</PropertyGroup>
...
...
TheMachine/App.config
查看文件 @
2efb382
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
</
root
>-->
</
root
>-->
</
log4net
>
</
log4net
>
<
startup
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
7.1
"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6.2
"
/>
</
startup
>
</
startup
>
<
runtime
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
...
...
TheMachine/AxisControl.Designer.cs
查看文件 @
2efb382
...
@@ -31,13 +31,19 @@ namespace TheMachine
...
@@ -31,13 +31,19 @@ namespace TheMachine
{
{
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
axisMoveControl1
=
new
DeviceLibrary
.
AxisMoveControl
();
this
.
axisMoveControl1
=
new
DeviceLibrary
.
AxisMoveControl
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
cb_sizelist
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
lbl_acheight
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_comptest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
configControl1
=
new
TheMachine
.
ConfigControl
();
this
.
configControl1
=
new
TheMachine
.
ConfigControl
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// panel1
// panel1
//
//
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
panel1
.
Controls
.
Add
(
this
.
axisMoveControl1
);
this
.
panel1
.
Controls
.
Add
(
this
.
axisMoveControl1
);
this
.
panel1
.
Controls
.
Add
(
this
.
configControl1
);
this
.
panel1
.
Controls
.
Add
(
this
.
configControl1
);
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
...
@@ -54,10 +60,53 @@ namespace TheMachine
...
@@ -54,10 +60,53 @@ namespace TheMachine
this
.
axisMoveControl1
.
TabIndex
=
0
;
this
.
axisMoveControl1
.
TabIndex
=
0
;
this
.
axisMoveControl1
.
Tag
=
"not"
;
this
.
axisMoveControl1
.
Tag
=
"not"
;
//
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_comptest
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl_acheight
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cb_sizelist
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
430
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
547
,
50
);
this
.
groupBox1
.
TabIndex
=
2
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"压紧轴点位调试"
;
//
// cb_sizelist
//
this
.
cb_sizelist
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_sizelist
.
FormattingEnabled
=
true
;
this
.
cb_sizelist
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
21
);
this
.
cb_sizelist
.
Name
=
"cb_sizelist"
;
this
.
cb_sizelist
.
Size
=
new
System
.
Drawing
.
Size
(
172
,
20
);
this
.
cb_sizelist
.
TabIndex
=
0
;
this
.
cb_sizelist
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_sizelist_SelectedIndexChanged
);
//
// lbl_acheight
//
this
.
lbl_acheight
.
AutoSize
=
true
;
this
.
lbl_acheight
.
Location
=
new
System
.
Drawing
.
Point
(
185
,
24
);
this
.
lbl_acheight
.
Name
=
"lbl_acheight"
;
this
.
lbl_acheight
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
lbl_acheight
.
TabIndex
=
1
;
this
.
lbl_acheight
.
Text
=
"设置高度"
;
//
// btn_comptest
//
this
.
btn_comptest
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
19
);
this
.
btn_comptest
.
Name
=
"btn_comptest"
;
this
.
btn_comptest
.
Size
=
new
System
.
Drawing
.
Size
(
111
,
23
);
this
.
btn_comptest
.
TabIndex
=
2
;
this
.
btn_comptest
.
Text
=
"压紧测试"
;
this
.
btn_comptest
.
UseVisualStyleBackColor
=
true
;
this
.
btn_comptest
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_comptest_Click
);
//
// configControl1
// configControl1
//
//
this
.
configControl1
.
Config
=
null
;
this
.
configControl1
.
Location
=
new
System
.
Drawing
.
Point
(
568
,
3
);
this
.
configControl1
.
Location
=
new
System
.
Drawing
.
Point
(
568
,
3
);
this
.
configControl1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
configControl1
.
Machine
=
null
;
this
.
configControl1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
configControl1
.
Name
=
"configControl1"
;
this
.
configControl1
.
Name
=
"configControl1"
;
this
.
configControl1
.
Size
=
new
System
.
Drawing
.
Size
(
647
,
477
);
this
.
configControl1
.
Size
=
new
System
.
Drawing
.
Size
(
647
,
477
);
this
.
configControl1
.
TabIndex
=
1
;
this
.
configControl1
.
TabIndex
=
1
;
...
@@ -73,6 +122,8 @@ namespace TheMachine
...
@@ -73,6 +122,8 @@ namespace TheMachine
this
.
Size
=
new
System
.
Drawing
.
Size
(
1234
,
924
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
1234
,
924
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
AxisControl_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
AxisControl_Load
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -82,5 +133,9 @@ namespace TheMachine
...
@@ -82,5 +133,9 @@ namespace TheMachine
private
DeviceLibrary
.
AxisMoveControl
axisMoveControl1
;
private
DeviceLibrary
.
AxisMoveControl
axisMoveControl1
;
private
ConfigControl
configControl1
;
private
ConfigControl
configControl1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_sizelist
;
private
System
.
Windows
.
Forms
.
Button
btn_comptest
;
private
System
.
Windows
.
Forms
.
Label
lbl_acheight
;
}
}
}
}
TheMachine/AxisControl.cs
查看文件 @
2efb382
using
DeviceLibrary
;
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
@@ -26,11 +26,13 @@ namespace TheMachine
...
@@ -26,11 +26,13 @@ namespace TheMachine
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
configControl1
.
Machine
=
machine
;
configControl1
.
Machine
=
machine
;
crc
.
LanguageProcess
(
this
);
}
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
{
RobotManage_LoadFinishEvent
(
true
,
""
);
RobotManage_LoadFinishEvent
(
true
,
""
);
crc
.
LanguageProcess
(
this
);
}
}
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
...
@@ -54,7 +56,79 @@ namespace TheMachine
...
@@ -54,7 +56,79 @@ namespace TheMachine
private
void
AxisControl_Load
(
object
sender
,
EventArgs
e
)
private
void
AxisControl_Load
(
object
sender
,
EventArgs
e
)
{
{
var
sizelist
=
Machine
.
StorePosition
.
Values
.
Distinct
(
new
ACStorePositionComparer
());
var
ll
=
sizelist
.
Select
(
a
=>
{
return
new
Position
(
a
.
BagWidth
,
a
.
BagHigh
);
}).
ToList
();
ll
.
AddRange
(
FixtureConfig
.
FixtureConfigList
.
Select
(
a
=>
{
return
new
Position
(
a
.
Width
,
a
.
Height
);
}).
ToArray
());
var
aa
=
ll
.
Distinct
(
new
PositionComparer
());
cb_sizelist
.
Items
.
AddRange
(
aa
.
ToArray
());
if
(
cb_sizelist
.
Items
.
Count
>
0
)
cb_sizelist
.
SelectedIndex
=
0
;
}
private
void
btn_comptest_Click
(
object
sender
,
EventArgs
e
)
{
Position
p
=
cb_sizelist
.
SelectedItem
as
Position
;
var
BagHigh
=
p
.
Height
;
if
(
FixtureConfig
.
GetFixtureHeight
(
p
.
Width
,
p
.
Height
,
out
int
actualheight
))
BagHigh
=
actualheight
;
var
Comp_PL
=
Machine
.
Config
.
Comp_P2
-
Machine
.
Config
.
Comp_PoToMM
*
(
BagHigh
-
70
);
Comp_PL
=
Comp_PL
<
0
?
0
:
Comp_PL
;
Machine
.
Comp_Axis
.
AbsMove
(
null
,
Comp_PL
,
Machine
.
Config
.
Comp_P1_speed
);
}
public
class
Position
{
public
int
Width
;
public
int
Height
;
public
Position
(
int
width
,
int
height
)
{
Width
=
width
;
Height
=
height
;
}
public
override
string
ToString
()
{
return
$
"{Width}x{Height}"
;
}
}
public
class
ACStorePositionComparer
:
IEqualityComparer
<
ACStorePosition
>
{
public
bool
Equals
(
ACStorePosition
x
,
ACStorePosition
y
)
{
if
(
x
==
null
&&
y
==
null
)
return
true
;
else
if
(
x
==
null
||
y
==
null
)
return
false
;
return
$
"{x.BagHigh}x{x.BagWidth}"
==
$
"{y.BagHigh}x{y.BagWidth}"
;
}
public
int
GetHashCode
(
ACStorePosition
obj
)
{
return
base
.
GetHashCode
();
}
}
public
class
PositionComparer
:
IEqualityComparer
<
Position
>
{
public
bool
Equals
(
Position
x
,
Position
y
)
{
if
(
x
==
null
&&
y
==
null
)
return
true
;
else
if
(
x
==
null
||
y
==
null
)
return
false
;
return
$
"{x.Height}x{x.Width}"
==
$
"{y.Height}x{y.Width}"
;
}
public
int
GetHashCode
(
Position
obj
)
{
return
base
.
GetHashCode
();
}
}
private
void
cb_sizelist_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
Position
p
=
cb_sizelist
.
SelectedItem
as
Position
;
var
BagHigh
=
p
.
Height
;
if
(
FixtureConfig
.
GetFixtureHeight
(
p
.
Width
,
p
.
Height
,
out
int
actualheight
))
BagHigh
=
actualheight
;
lbl_acheight
.
Text
=
crc
.
GetString
(
"AxisControl_panel1_groupBox1_lbl_acheight_Text"
,
"设置高度"
)
+
":"
+
BagHigh
+
"mm"
;
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
TheMachine/Form1.cs
查看文件 @
2efb382
...
@@ -193,8 +193,8 @@ namespace TheMachine
...
@@ -193,8 +193,8 @@ namespace TheMachine
const
int
tabpagecount
=
4
;
const
int
tabpagecount
=
4
;
void
addTablePage
()
{
void
addTablePage
()
{
AddForm
(
"tab_io"
,
crc
.
GetString
(
"Form1_tabc_tab_io_Text"
,
"IO调试"
),
ioc
);
AddForm
(
"tab_io"
,
crc
.
GetString
(
"Form1_tabc_tab_io_Text"
,
"IO调试"
),
ioc
);
AddForm
(
"tab_leftMachine"
,
crc
.
GetString
(
"Form1_tabc_tabP1_pnl_gb_left_Text"
,
"
B
侧料仓"
),
leftMachine
);
AddForm
(
"tab_leftMachine"
,
crc
.
GetString
(
"Form1_tabc_tabP1_pnl_gb_left_Text"
,
"
A
侧料仓"
),
leftMachine
);
AddForm
(
"tab_rightMachine"
,
crc
.
GetString
(
"Form1_tabc_tabP1_pnl_gb_right_Text"
,
"
A
侧料仓"
),
rightMachine
);
AddForm
(
"tab_rightMachine"
,
crc
.
GetString
(
"Form1_tabc_tabP1_pnl_gb_right_Text"
,
"
B
侧料仓"
),
rightMachine
);
AddForm
(
"tab_sc"
,
crc
.
GetString
(
"Form1_tabc_tab_sc_Text"
,
"通用设置"
),
sc
);
AddForm
(
"tab_sc"
,
crc
.
GetString
(
"Form1_tabc_tab_sc_Text"
,
"通用设置"
),
sc
);
crc
.
LanguageProcess
(
this
);
crc
.
LanguageProcess
(
this
);
}
}
...
...
TheMachine/Properties/Resources.Designer.cs
查看文件 @
2efb382
...
@@ -19,7 +19,7 @@ namespace TheMachine.Properties {
...
@@ -19,7 +19,7 @@ namespace TheMachine.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
// (以 /str 作为命令选项),或重新生成 VS 项目。
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"1
6
.0.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"1
7
.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
Resources
{
internal
class
Resources
{
...
...
TheMachine/Properties/Settings.Designer.cs
查看文件 @
2efb382
...
@@ -12,7 +12,7 @@ namespace TheMachine.Properties {
...
@@ -12,7 +12,7 @@ namespace TheMachine.Properties {
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
6.10
.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"1
7.5
.0.0"
)]
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
2efb382
...
@@ -30,7 +30,6 @@ namespace TheMachine
...
@@ -30,7 +30,6 @@ namespace TheMachine
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
chbAutoRun
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_tempsensorport
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cb_tempsensorport
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label_tempsensor
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_tempsensor
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl_hmdstate
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl_hmdstate
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -38,31 +37,20 @@ namespace TheMachine
...
@@ -38,31 +37,20 @@ namespace TheMachine
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage_set
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage_set
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
fixtureSizeConfigControl1
=
new
DeviceLibrary
.
FixtureSizeConfigControl
();
this
.
tp
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// chbAutoRun
//
this
.
chbAutoRun
.
AutoSize
=
true
;
this
.
tp
.
SetColumnSpan
(
this
.
chbAutoRun
,
2
);
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
74
);
this
.
chbAutoRun
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
chbAutoRun
.
Name
=
"chbAutoRun"
;
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
chbAutoRun
.
TabIndex
=
1
;
this
.
chbAutoRun
.
Text
=
"开机自启动"
;
this
.
chbAutoRun
.
UseVisualStyleBackColor
=
true
;
//
// cb_tempsensorport
// cb_tempsensorport
//
//
this
.
cb_tempsensorport
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_tempsensorport
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_tempsensorport
.
FormattingEnabled
=
true
;
this
.
cb_tempsensorport
.
FormattingEnabled
=
true
;
this
.
cb_tempsensorport
.
Location
=
new
System
.
Drawing
.
Point
(
1
39
,
6
);
this
.
cb_tempsensorport
.
Location
=
new
System
.
Drawing
.
Point
(
1
54
,
6
);
this
.
cb_tempsensorport
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
);
this
.
cb_tempsensorport
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
);
this
.
cb_tempsensorport
.
Name
=
"cb_tempsensorport"
;
this
.
cb_tempsensorport
.
Name
=
"cb_tempsensorport"
;
this
.
cb_tempsensorport
.
Size
=
new
System
.
Drawing
.
Size
(
1
21
,
20
);
this
.
cb_tempsensorport
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
25
);
this
.
cb_tempsensorport
.
TabIndex
=
2
;
this
.
cb_tempsensorport
.
TabIndex
=
2
;
this
.
cb_tempsensorport
.
Tag
=
"not"
;
this
.
cb_tempsensorport
.
Tag
=
"not"
;
//
//
...
@@ -73,22 +61,22 @@ namespace TheMachine
...
@@ -73,22 +61,22 @@ namespace TheMachine
this
.
label_tempsensor
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
10
);
this
.
label_tempsensor
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
10
);
this
.
label_tempsensor
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
label_tempsensor
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
label_tempsensor
.
Name
=
"label_tempsensor"
;
this
.
label_tempsensor
.
Name
=
"label_tempsensor"
;
this
.
label_tempsensor
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
1
2
);
this
.
label_tempsensor
.
Size
=
new
System
.
Drawing
.
Size
(
107
,
1
7
);
this
.
label_tempsensor
.
TabIndex
=
3
;
this
.
label_tempsensor
.
TabIndex
=
3
;
this
.
label_tempsensor
.
Text
=
"温湿度控制器端口:"
;
this
.
label_tempsensor
.
Text
=
"温湿度控制器端口:"
;
this
.
label_tempsensor
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
this
.
label_tempsensor
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
//
// lbl_hmdstate
// lbl_hmdstate
//
//
this
.
lbl_hmdstate
.
AutoSize
=
true
;
this
.
tp
.
SetColumnSpan
(
this
.
lbl_hmdstate
,
2
);
this
.
tp
.
SetColumnSpan
(
this
.
lbl_hmdstate
,
2
);
this
.
lbl_hmdstate
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
4
2
);
this
.
lbl_hmdstate
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
4
7
);
this
.
lbl_hmdstate
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
lbl_hmdstate
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
lbl_hmdstate
.
Name
=
"lbl_hmdstate"
;
this
.
lbl_hmdstate
.
Name
=
"lbl_hmdstate"
;
this
.
lbl_hmdstate
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
lbl_hmdstate
.
Size
=
new
System
.
Drawing
.
Size
(
313
,
19
);
this
.
lbl_hmdstate
.
TabIndex
=
5
;
this
.
lbl_hmdstate
.
TabIndex
=
5
;
this
.
lbl_hmdstate
.
Tag
=
"not"
;
this
.
lbl_hmdstate
.
Tag
=
"not"
;
this
.
lbl_hmdstate
.
Text
=
"当前状态"
;
this
.
lbl_hmdstate
.
Text
=
"当前状态"
;
this
.
lbl_hmdstate
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
//
// timer1
// timer1
//
//
...
@@ -100,12 +88,11 @@ namespace TheMachine
...
@@ -100,12 +88,11 @@ namespace TheMachine
this
.
tp
.
AutoSize
=
true
;
this
.
tp
.
AutoSize
=
true
;
this
.
tp
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
AutoSizeMode
.
GrowAndShrink
;
this
.
tp
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
AutoSizeMode
.
GrowAndShrink
;
this
.
tp
.
ColumnCount
=
2
;
this
.
tp
.
ColumnCount
=
2
;
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50
F
));
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
41.94444
F
));
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5
0
F
));
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5
8.05556
F
));
this
.
tp
.
Controls
.
Add
(
this
.
label_tempsensor
,
0
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
label_tempsensor
,
0
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
cb_tempsensorport
,
1
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
cb_tempsensorport
,
1
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
lbl_hmdstate
,
0
,
4
);
this
.
tp
.
Controls
.
Add
(
this
.
lbl_hmdstate
,
0
,
4
);
this
.
tp
.
Controls
.
Add
(
this
.
chbAutoRun
,
0
,
7
);
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
18
);
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
18
);
this
.
tp
.
Name
=
"tp"
;
this
.
tp
.
Name
=
"tp"
;
this
.
tp
.
RowCount
=
9
;
this
.
tp
.
RowCount
=
9
;
...
@@ -118,7 +105,7 @@ namespace TheMachine
...
@@ -118,7 +105,7 @@ namespace TheMachine
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
266
,
100
);
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
355
,
76
);
this
.
tp
.
TabIndex
=
6
;
this
.
tp
.
TabIndex
=
6
;
//
//
// tabControl1
// tabControl1
...
@@ -133,7 +120,9 @@ namespace TheMachine
...
@@ -133,7 +120,9 @@ namespace TheMachine
//
//
// tabPage_set
// tabPage_set
//
//
this
.
tabPage_set
.
Controls
.
Add
(
this
.
fixtureSizeConfigControl1
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
tp
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
tp
);
this
.
tabPage_set
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
tabPage_set
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_set
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tabPage_set
.
Name
=
"tabPage_set"
;
this
.
tabPage_set
.
Name
=
"tabPage_set"
;
this
.
tabPage_set
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage_set
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
...
@@ -142,6 +131,14 @@ namespace TheMachine
...
@@ -142,6 +131,14 @@ namespace TheMachine
this
.
tabPage_set
.
Text
=
"常规设置"
;
this
.
tabPage_set
.
Text
=
"常规设置"
;
this
.
tabPage_set
.
UseVisualStyleBackColor
=
true
;
this
.
tabPage_set
.
UseVisualStyleBackColor
=
true
;
//
//
// fixtureSizeConfigControl1
//
this
.
fixtureSizeConfigControl1
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
fixtureSizeConfigControl1
.
Location
=
new
System
.
Drawing
.
Point
(
399
,
18
);
this
.
fixtureSizeConfigControl1
.
Name
=
"fixtureSizeConfigControl1"
;
this
.
fixtureSizeConfigControl1
.
Size
=
new
System
.
Drawing
.
Size
(
439
,
475
);
this
.
fixtureSizeConfigControl1
.
TabIndex
=
7
;
//
// SettingControl
// SettingControl
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
@@ -159,7 +156,6 @@ namespace TheMachine
...
@@ -159,7 +156,6 @@ namespace TheMachine
}
}
#
endregion
#
endregion
private
System
.
Windows
.
Forms
.
CheckBox
chbAutoRun
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_tempsensorport
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_tempsensorport
;
private
System
.
Windows
.
Forms
.
Label
label_tempsensor
;
private
System
.
Windows
.
Forms
.
Label
label_tempsensor
;
private
System
.
Windows
.
Forms
.
Label
lbl_hmdstate
;
private
System
.
Windows
.
Forms
.
Label
lbl_hmdstate
;
...
@@ -168,5 +164,6 @@ namespace TheMachine
...
@@ -168,5 +164,6 @@ namespace TheMachine
private
UC
.
UC_LedConfig
uC_LedConfig1
;
private
UC
.
UC_LedConfig
uC_LedConfig1
;
private
System
.
Windows
.
Forms
.
TabControl
tabControl1
;
private
System
.
Windows
.
Forms
.
TabControl
tabControl1
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_set
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage_set
;
private
DeviceLibrary
.
FixtureSizeConfigControl
fixtureSizeConfigControl1
;
}
}
}
}
TheMachine/SettingControl.cs
查看文件 @
2efb382
...
@@ -24,8 +24,9 @@ namespace TheMachine
...
@@ -24,8 +24,9 @@ namespace TheMachine
{
{
InitializeComponent
();
InitializeComponent
();
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
chbAutoRun
.
Checked
=
Setting_Init
.
App_AutoRun
;
this
.
chbAutoRun
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbAutoRun_CheckedChanged
);
//chbAutoRun.Checked =Setting_Init.App_AutoRun;
//this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged);
for
(
int
i
=
0
;
i
<
20
;
i
++)
for
(
int
i
=
0
;
i
<
20
;
i
++)
{
{
cb_tempsensorport
.
Items
.
Add
(
"COM"
+
i
);
cb_tempsensorport
.
Items
.
Add
(
"COM"
+
i
);
...
@@ -44,45 +45,14 @@ namespace TheMachine
...
@@ -44,45 +45,14 @@ namespace TheMachine
{
{
if
(!
state
)
if
(!
state
)
return
;
return
;
//uC_LedConfig1.Config = RobotManage.Config;
//uC_LedConfig1.Config = RobotManage.Config;
}
}
private
void
SettingControl_Load
(
object
sender
,
EventArgs
e
)
private
void
SettingControl_Load
(
object
sender
,
EventArgs
e
)
{
{
Config
.
PropertyBind
(
Setting_Init
.
Device_Humiture_Port
.
Key
,
cb_tempsensorport
,
"SelectedItem"
,
"SelectedIndexChanged"
);
Config
.
PropertyBind
(
Setting_Init
.
Device_Humiture_Port
.
Key
,
cb_tempsensorport
,
"SelectedItem"
,
"SelectedIndexChanged"
);
}
}
public
static
void
AutoRun
(
string
strName
,
bool
value
)
{
try
{
//创建启动对象
System
.
Diagnostics
.
ProcessStartInfo
startInfo
=
new
System
.
Diagnostics
.
ProcessStartInfo
();
//设置运行文件
startInfo
.
FileName
=
System
.
Windows
.
Forms
.
Application
.
StartupPath
+
"\\AuToRunManager.exe"
;
//设置启动参数
startInfo
.
Arguments
=
String
.
Join
(
" "
,
new
string
[
2
]
{
strName
,
value
.
ToString
()
});
//设置启动动作,确保以管理员身份运行
startInfo
.
Verb
=
"runas"
;
//如果不是管理员,则启动UAC
System
.
Diagnostics
.
Process
.
Start
(
startInfo
);
}
catch
(
Exception
ex
)
{
MessageBox
.
Show
(
ex
.
ToString
());
}
}
private
void
chbAutoRun_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
Setting_Init
.
App_AutoRun
=
chbAutoRun
.
Checked
;
AutoRun
(
Application
.
ExecutablePath
,
Setting_Init
.
App_AutoRun
);
}
private
void
cb_tempsensorport_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
private
void
cb_tempsensorport_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
{
HumitureController
.
Init
(
Setting_Init
.
Device_Humiture_Port
);
HumitureController
.
Init
(
Setting_Init
.
Device_Humiture_Port
);
...
...
TheMachine/TheMachine.csproj
查看文件 @
2efb382
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace>
<RootNamespace>TheMachine</RootNamespace>
<AssemblyName>SBDH</AssemblyName>
<AssemblyName>SBDH</AssemblyName>
<TargetFrameworkVersion>v4.
7.1
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
6.2
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
<Deterministic>false</Deterministic>
...
...
TheMachine/UC/FrmPassCheck.cs
查看文件 @
2efb382
...
@@ -17,6 +17,7 @@ namespace TheMachine
...
@@ -17,6 +17,7 @@ namespace TheMachine
public
FrmPassCheck
()
public
FrmPassCheck
()
{
{
InitializeComponent
();
InitializeComponent
();
crc
.
LanguageProcess
(
this
);
}
}
public
static
bool
CheckPassword
()
{
public
static
bool
CheckPassword
()
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论