Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6e8922c1
由
刘韬
编写于
2022-04-20 15:34:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
梳理灯塔逻辑
1 个父辈
6b78cf3e
全部展开
显示空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
527 行增加
和
211 行删除
Common/CodeResourceControl.cs
Common/Common.csproj
Common/StringList.cs
DeviceLibrary/DeviceLibrary/Camera.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
DeviceLibrary/theMachine/MainMachine _Common.cs
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_ServerControl.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/MoveInfo.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
DeviceLibrary/userControl/AxisMoveControl.cs
DeviceLibrary/userControl/AxisTipControl.Designer.cs
DeviceLibrary/userControl/AxisTipControl.cs
SO1069MIMO语言.xlsx
TheMachine/AboutBox1.Designer.cs
TheMachine/AboutBox1.cs
TheMachine/App.config
TheMachine/AxisControl.Designer.cs
TheMachine/AxisControl.cs
TheMachine/Form1.Designer.cs
TheMachine/Form1.cs
TheMachine/IOControls.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/UC/StorePosControl.cs
TheMachine/UC/uc_boxdebug.Designer.cs
TheMachine/UC/uc_boxdebug.cs
TheMachine/positionTool/FrmPositionTool.Designer.cs
TheMachine/positionTool/FrmPositionTool.cs
Common/CodeResourceControl.cs
查看文件 @
6e8922c
...
...
@@ -10,7 +10,10 @@ using System.Windows.Forms.Layout;
namespace
OnlineStore
{
public
class
crc
:
CodeResourceControl
{
}
public
class
crc
:
CodeResourceControl
{
}
public
class
CodeResourceControl
{
public
static
readonly
ILog
LOG
=
LogManager
.
GetLogger
(
"LngResource"
);
...
...
@@ -62,6 +65,10 @@ namespace OnlineStore
{
return
class
Name
+
spiltStr
+
Text
;
}
public
static
string
GetString
(
object
id
,
string
defaultStr
)
{
return
GetString
(
id
.
ToString
(),
defaultStr
);
}
public
static
string
GetString
(
string
id
,
string
defaultStr
)
{
string
strCurLanguage
=
defaultStr
;
...
...
@@ -111,10 +118,11 @@ namespace OnlineStore
if
(!
LangMap
[
"zh-CN"
].
ContainsKey
(
id
)
&&
checkInterid
(
id
)
&&
!
hss
.
Contains
(
id
))
{
hss
.
Add
(
id
);
LOG
.
Info
(
"
No Res id:"
+
id
+
"#
"
+
defaultStr
);
LOG
.
Info
(
"
"
+
id
+
"\t
"
+
defaultStr
);
}
}
}
private
static
bool
checkInterid
(
string
id
)
{
return
true
;
...
...
@@ -138,7 +146,7 @@ namespace OnlineStore
var
map
=
new
Dictionary
<
string
,
string
>();
foreach
(
string
line
in
lines
)
{
string
[]
array
=
line
.
Split
(
'
#
'
);
string
[]
array
=
line
.
Split
(
'
\t
'
);
if
(
array
.
Length
>=
3
)
{
string
key
=
array
[
0
];
...
...
@@ -180,13 +188,13 @@ namespace OnlineStore
}
private
static
void
PreControlLanaguage
(
Control
partentControl
,
string
class
Name
)
{
//string className = this.ClassName
;
Con_GetTxt
(
partentControl
,
out
string
title
);
string
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
partentControl
.
Name
),
title
);
if
(!
newStr
.
Equals
(
""
))
{
Con_SetTxt
(
partentControl
,
newStr
.
Replace
(
"\\n"
,
"\n"
));
}
string
newStr
=
""
;
//
Con_GetTxt(partentControl, out string title);
//
string newStr = GetString(GetTextIdStr(className, partentControl.Name), title);
//
if (!newStr.Equals(""))
//
{
//
Con_SetTxt(partentControl, newStr.Replace("\\n", "\n"));
//
}
foreach
(
Control
con
in
partentControl
.
Controls
)
{
string
txt
=
""
;
...
...
Common/Common.csproj
查看文件 @
6e8922c
...
...
@@ -55,6 +55,7 @@
<Compile Include="CodeResourceControl.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setting_Init.cs" />
<Compile Include="StringList.cs" />
<Compile Include="util\AcSerialBean.cs" />
<Compile Include="util\ConfigAppSettings.cs" />
<Compile Include="util\FormUtil.cs" />
...
...
Common/StringList.cs
0 → 100644
查看文件 @
6e8922c
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.Common
{
public
enum
L
{
enable_config_mode
,
disable_config_mode
,
safty_release_string
,
safty_releaseing_string
,
safty_releaseed_string
,
connect_fail
,
humidity
,
current_status
,
device_initializing
,
tab_io
,
tab_axis
,
tab_store
,
tab_setting
,
tab_log
,
table_datetime
,
table_info
,
table_module
,
table_step
,
device_isrunning_cant_exit
,
start
,
device_pause
,
device_resume
,
device_suddenstop_cant_start
,
open_debug_mode
,
iocard_init_fail
,
tempnhum_sensor_init_fail
,
cant_find_storeposfile
,
transfer_equipment
,
string_inout_equipment
,
clamp_equipment
,
store_manage_equipment
,
reset_equipment
,
autotest_inout_equipment
,
Clamp_Axis_interference_01
,
Clamp_Axis_interference_02
,
Clamp_Axis_interference_03
,
Middle_Axis_interference_01
,
UpDown_Axis_interference_01
,
out_store_wait_ngdoor_ready
,
out_store_not_detect_material
,
out_store_detect_material
,
out_store_wait_string_ready
,
in_store_detect_material
,
wait_reel_transfer
,
reset_press
,
reset_press_with_sudden
,
runbtn_press
,
system_is_running
,
runbtn_press_with_sudden
,
not_detect_airpressure
,
x29_low_no_reel
,
wait_put_reel_into_ngdoor
,
ignored
,
SafetyLight_is_block
,
left_safedoor_not_close
,
right_safedoor_not_close
,
back_safedoor_not_close
,
x29_higt_has_reel
,
system_pause
,
in_suddenstop
,
system_need_reset
,
store_inout_debug_mode
,
airpressure_not_enough
,
motion_alarm
,
wait_detect_reel_height
,
wait_user_select_pos
,
wait_server_response_pos
,
reel_wait_in_store
,
please_take_ngdoor_reel
,
no_string
,
wait_stringdoor_close
,
detect_string
,
string_ready_for_get
,
wait_string_take
,
string_ready_for_put
,
in_store_ng
,
posnum
,
not_detect_reel_height
,
not_detect_reel_code
,
scan_code_timeout
,
wait_server_response_pos_timeout
,
string_releasing
,
ngdoor
,
scanning_code
,
taking_code
,
no_info_reel
,
ngdoor_reel_out
,
timeout
,
wait
,
empty_reel
,
full_reel
,
instore_reel
,
string_prepare
,
free
,
reel_outting
,
reel_ining
,
FrmPositionTool_serv_state
,
FrmPositionTool_enable
,
FrmPositionTool_disable
,
FrmPositionTool_homests
,
FrmPositionTool_finish
,
FrmPositionTool_unfinish
,
FrmPositionTool_busysts
,
FrmPositionTool_busying
,
detect_signal
,
reel_not_onposition_cant_manual_in
,
stop_inout_test
,
start_device_first
,
tips
,
autotest_msg_01
,
autotest_msg_02
,
stop_auto_test
,
start_auto_test
,
store_busy_cant_manual_out
,
monitor_open_fail
,
monitor_config_load_fail
,
monitor_config_not_exist
,
AxisMoveControl_status_monitor
}
}
DeviceLibrary/DeviceLibrary/Camera.cs
查看文件 @
6e8922c
using
Asa.Camera
;
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
System
;
...
...
@@ -38,7 +39,7 @@ public class HIKCamera
string
path
=
$
".\\Config\\{CameraID}.json"
;
if
(!
File
.
Exists
(
path
))
{
msg
=
Name
+
"找不到监控相机配置文件"
;
msg
=
Name
+
crc
.
GetString
(
L
.
monitor_config_not_exist
,
"找不到监控相机配置文件"
)
;
LogUtil
.
error
(
Name
+
"找不到监控相机配置文件"
+
path
);
return
false
;
}
...
...
@@ -57,7 +58,7 @@ public class HIKCamera
}
catch
(
Exception
e
)
{
msg
=
Name
+
"加载监控相机配置文件失败:"
+
e
.
ToString
();
msg
=
Name
+
crc
.
GetString
(
L
.
monitor_config_load_fail
,
"加载监控相机配置文件失败:"
)
+
e
.
ToString
();
LogUtil
.
error
(
Name
+
"加载监控相机配置文件失败:"
+
e
.
ToString
());
return
false
;
}
...
...
@@ -65,7 +66,7 @@ public class HIKCamera
Bitmap
bmp
=
camera
.
GetImage
(
DeviceName
);
if
(
bmp
==
null
)
{
msg
=
Name
+
$
"监控相机打开失败"
;
msg
=
Name
+
crc
.
GetString
(
L
.
monitor_open_fail
,
"监控相机打开失败"
)
;
LogUtil
.
error
(
Name
+
$
"监控相机打开失败"
);
return
false
;
}
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
6e8922c
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -33,7 +35,7 @@ namespace DeviceLibrary
{
Config
=
_Config
;
mainMachine
=
_mainMachine
;
MoveInfo
=
new
MoveInfo
(
"出入库机构"
,
false
);
MoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
L
.
transfer_equipment
,
"出入库机构"
)
,
false
);
#
region
初始化伺服轴
Middle_Axis
=
_mainMachine
.
Middle_Axis
;
UpDown_Axis
=
_mainMachine
.
UpDown_Axis
;
...
...
@@ -105,7 +107,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreTS01
:
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"出库时料叉X30检测到有物料无法继续,请检查"
,
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_detect_material
,
"出库时料叉X30检测到有物料无法继续,请检查."
)
,
MsgLevel
.
alarm
);
RobotManage
.
UserPause
(
"出库时料叉X30检测到有物料无法继续,请检查"
);
}
else
...
...
@@ -162,7 +164,7 @@ namespace DeviceLibrary
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
From
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
FromOut
));
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
"出库时料叉X30没有检测到有物料无法继续,请检查"
,
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_not_detect_material
,
"出库时料叉X30没有检测到有物料无法继续,请检查."
)
,
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
//RobotManage.UserPause("出库时料叉X30没有检测到有物料无法继续,请检查");
}
else
...
...
@@ -184,7 +186,7 @@ namespace DeviceLibrary
if
(!
mainMachine
.
IsPutReelReady
)
{
//if (MoveInfo.IsTimeOut(20))
Msg
.
add
(
"等待料串准备好放料"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_wait_string_ready
,
"等待料串准备好放料."
)
,
MsgLevel
.
warning
);
MoveInfo
.
log
(
$
"等待料串准备好放料"
);
return
false
;
}
...
...
@@ -193,7 +195,7 @@ namespace DeviceLibrary
if
(
mainMachine
.
ClampMoveInfo
.
MoveStep
!=
MoveStep
.
Wait
)
{
//if (MoveInfo.IsTimeOut(20))
Msg
.
add
(
"等待单料口空闲"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_wait_ngdoor_ready
,
"等待单料口空闲."
)
,
MsgLevel
.
warning
);
MoveInfo
.
log
(
$
"等待单料口空闲"
);
return
false
;
}
...
...
@@ -222,7 +224,7 @@ namespace DeviceLibrary
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
To
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
ToOut
));
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"入库后料叉X30上任然检测到物料,请检查"
,
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
in_store_detect_material
,
"入库后料叉X30上任然检测到物料,请检查."
)
,
MsgLevel
.
alarm
);
RobotManage
.
UserPause
(
"入库后料叉X30上任然检测到物料,请检查"
);
}
else
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -96,12 +97,12 @@ namespace DeviceLibrary
{
if
(
IsNg
)
{
return
$
"入库NG
:{NgMsg}[{WareCode}]"
;
return
crc
.
GetString
(
L
.
in_store_ng
,
"入库NG"
)+
$
"
:{NgMsg}[{WareCode}]"
;
}
else
{
return
$
"库位号
:[{PosID}][{WareCode}] "
;
return
crc
.
GetString
(
L
.
posnum
,
"库位号"
)
+
$
"
:[{PosID}][{WareCode}] "
;
}
}
...
...
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -78,7 +79,7 @@ namespace DeviceLibrary
}
else
{
Msg
.
add
(
"反转托盘等待料盘离开"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_reel_transfer
,
"单料口等待料盘离开."
)
,
MsgLevel
.
info
);
}
break
;
case
MoveStep
.
StoreIn03
:
...
...
@@ -120,7 +121,7 @@ namespace DeviceLibrary
}
else
{
Msg
.
add
(
"翻转托盘等待料盘离开"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_reel_transfer
,
"单料口等待料盘离开."
)
,
MsgLevel
.
info
);
}
break
;
case
MoveStep
.
StoreIn06
:
...
...
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -20,12 +21,11 @@ namespace DeviceLibrary
void
Reset_BTN
()
{
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"按下复位按钮"
,
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press
,
"按下复位按钮."
)
,
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
}
else
{
Msg
.
add
(
"急停未解除,按下复位按钮"
,
MsgLevel
.
info
);
Msg
.
add
(
"按下复位按钮"
,
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press_with_sudden
,
"急停未解除,按下复位按钮尝试复位安全继电器."
),
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
}
LogUtil
.
info
(
"按下复位按钮"
);
...
...
@@ -41,13 +41,13 @@ namespace DeviceLibrary
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(!
RobotManage
.
isRunning
)
Msg
.
add
(
"按下启动按钮,开始启动"
,
MsgLevel
.
info
,
ErrInfo
.
RunBtn
);
Msg
.
add
(
crc
.
GetString
(
L
.
runbtn_press
,
"按下启动按钮,开始启动."
)
,
MsgLevel
.
info
,
ErrInfo
.
RunBtn
);
else
Msg
.
add
(
"系统正在运行,不能再次启动"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
system_is_running
,
"系统正在运行."
)
,
MsgLevel
.
info
);
}
else
{
Msg
.
add
(
"急停中,按下启动按钮,无法启动"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
runbtn_press_with_sudden
,
"急停中,按下启动按钮,无法启动."
)
,
MsgLevel
.
warning
);
}
LogUtil
.
info
(
"按下启动按钮"
);
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
...
...
DeviceLibrary/theMachine/MainMachine _Common.cs
查看文件 @
6e8922c
using
OnlineStore.Common
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -76,7 +77,7 @@ namespace DeviceLibrary
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W002_IOValue
))
{
ConfigIO
io
=
RobotManage
.
Config
.
getWaitIO
(
wait
.
IoType
);
NotOkMsg
=
MoveInfo
.
Name
+
" 等待
【"
+
io
.
DisplayStr
+
"】=【"
+
wait
.
IoValue
+
"】"
;
NotOkMsg
=
MoveInfo
.
Name
+
$
" {crc.GetString(L.wait, "
等待
")}
【"
+
io
.
DisplayStr
+
"】=【"
+
wait
.
IoValue
+
"】"
;
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
if
(!
wait
.
IsEnd
)
{
...
...
@@ -84,7 +85,7 @@ namespace DeviceLibrary
if
(
span
.
TotalMilliseconds
>
timeOutMs
&&
NoAlarm
())
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时
"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
$
"] {crc.GetString(L.wait, "
等待
")}("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
$
") {crc.GetString(L.timeout, "
超时
")}
"
;
Msg
.
add
(
WarnMsg
,
MsgLevel
.
alarm
);
if
(
NoAlarm
())
...
...
@@ -173,7 +174,7 @@ namespace DeviceLibrary
}
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
+
"超时
["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
$
"]{crc.GetString(L.wait, "
等待
")}"
+
NotOkMsg
+
$
"{crc.GetString(L.timeout, "
超时
")}
["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
int
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
if
(
second
>
120
)
...
...
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -16,7 +17,7 @@ namespace DeviceLibrary
void
ioMonitor
()
{
if
(
IOValue
(
IO_Type
.
Airpressure_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
"未检测到气压信号"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
not_detect_airpressure
,
"未检测到气压信号."
)
,
MsgLevel
.
warning
);
}
airprocess
();
}
...
...
@@ -52,5 +53,28 @@ namespace DeviceLibrary
LogUtil
.
info
(
$
"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{ConfigHelper.Config.Get("
Device_HumidityEndOffser
", 10)}."
);
}
}
bool
lastTHoutRangeStatus
=
false
;
DateTime
lastTHoutRangeTime
=
DateTime
.
MaxValue
;
bool
IsTHoutRange
()
{
if
(
HumitureController
.
LastData
.
Humidity
>
ServerCM
.
Max_Humidity
||
HumitureController
.
LastData
.
Temperate
>
ServerCM
.
Max_Temperature
)
{
if
(!
lastTHoutRangeStatus
)
lastTHoutRangeTime
=
DateTime
.
Now
;
lastTHoutRangeStatus
=
true
;
return
true
;
}
else
{
if
(
lastTHoutRangeStatus
)
lastTHoutRangeTime
=
DateTime
.
MaxValue
;
lastTHoutRangeStatus
=
false
;
return
false
;
}
}
bool
IsTHoutRangeOver30m
()
{
return
(
DateTime
.
Now
-
lastTHoutRangeTime
).
TotalMinutes
>
30
;
}
}
}
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
查看文件 @
6e8922c
...
...
@@ -30,31 +30,48 @@ namespace DeviceLibrary
AlarmLed
.
LedState
=
LedState
.
off
;
RunningLed
.
LedState
=
LedState
.
off
;
//无法运行,量报警灯
if
(!
canRunning
)
{
AlarmLed
.
LedState
=
LedState
.
on
;
if
(
runStatus
!=
RunStatus
.
Stop
)
{
if
(
IsTHoutRange
())
{
RunningLed
.
LedState
=
LedState
.
on
;
StandbyLed
.
LedState
=
LedState
.
blink
;
}
if
(
hasAlarm
)
if
(
IsTHoutRangeOver30m
())
{
AlarmLed
.
LedState
=
LedState
.
on
;
//AlarmBuzzer.ON();
RunningLed
.
LedState
=
LedState
.
on
;
StandbyLed
.
LedState
=
LedState
.
blink
;
AlarmLed
.
LedState
=
LedState
.
blink
;
}
else
{
//AlarmBuzzer.OFF();
}
if
(
runStatus
==
RunStatus
.
HomeReset
)
{
Standby
Led
.
LedState
=
LedState
.
blink
;
Running
Led
.
LedState
=
LedState
.
blink
;
}
if
(
runStatus
==
RunStatus
.
Running
)
else
if
(
runStatus
==
RunStatus
.
Running
)
{
RunningLed
.
LedState
=
LedState
.
on
;
}
else
if
(
runStatus
==
RunStatus
.
Stop
&&
!
hasAlarm
)
{
if
(!
canRunning
)
RunningLed
.
LedState
=
LedState
.
blink
;
if
(
UserPause
)
RunningLed
.
LedState
=
LedState
.
blink
;
}
if
(
hasAlarm
)
AlarmLed
.
LedState
=
LedState
.
on
;
if
(
ClampMoveInfo
.
MoveStep
>
MoveStep
.
Wait
||
StoreMoveInfo
.
MoveStep
>
MoveStep
.
Wait
||
(
StringMoveInfo
.
MoveStep
>
MoveStep
.
Wait
&&
StringMoveInfo
.
MoveStep
!=
MoveStep
.
StringReadyPut
))
{
RunningLed
.
LedState
=
LedState
.
blink
;
StandbyLed
.
LedState
=
LedState
.
blink
;
}
Led
.
LedGroup
.
ForEach
((
x
)
=>
{
x
.
run
();
});
}
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
6e8922c
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -109,7 +110,7 @@ namespace DeviceLibrary
{
ClampErrorCount
++;
ClampMoveInfo
.
MoveParam
.
IsNg
=
true
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
"未检测到盘宽"
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
not_detect_reel_height
,
"未检测到盘宽"
)
;
ReelGetted
(
false
);
//RobotManage.UserPause("未检测到盘", true);
}
...
...
@@ -123,7 +124,7 @@ namespace DeviceLibrary
case
MoveStep
.
ReelClamp_WaitGaugeHeight
:
//ClampMoveInfo.NextMoveStep(MoveStep.StringLoad_12);
ClampMoveInfo
.
log
(
$
"等待测高"
);
Msg
.
add
(
"等待料盘测高"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_detect_reel_height
,
"等待料盘测高"
)
,
MsgLevel
.
info
);
//BatchAxisToP2(ClampMoveInfo);
break
;
case
MoveStep
.
ReelClamp_GetHeight
:
...
...
@@ -170,7 +171,7 @@ namespace DeviceLibrary
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_01
);
ClampMoveInfo
.
log
(
$
"未识别到有效二维码,送到NG口"
);
ClampMoveInfo
.
MoveParam
.
IsNg
=
true
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
"未识别到有效二维码"
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
not_detect_reel_code
,
"未识别到有效二维码"
)
;
return
;
}
else
...
...
@@ -188,29 +189,29 @@ namespace DeviceLibrary
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_01
);
ClampMoveInfo
.
MoveParam
.
IsNg
=
false
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
"扫码超时"
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
scan_code_timeout
,
"扫码超时"
)
;
ClampMoveInfo
.
log
(
$
"等待扫码超时,NG口送出"
);
}
break
;
case
MoveStep
.
InWaitServerCallback
:
if
(
RobotManage
.
InoutDebugMode
)
{
Msg
.
add
(
"等待手动选择入库库位"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_user_select_pos
,
"等待手动选择入库库位"
)
,
MsgLevel
.
warning
);
}
else
if
(
ClampMoveInfo
.
IsTimeOut
(
20
))
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_01
);
ClampMoveInfo
.
MoveParam
.
IsNg
=
true
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
"服务器返回库位超时"
;
ClampMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
wait_server_response_pos_timeout
,
"服务器返回库位超时"
)
;
ClampMoveInfo
.
log
(
$
"等待服务器返回库位超时"
);
}
else
if
(
ClampMoveInfo
.
IsTimeOut
(
5
))
Msg
.
add
(
"等待服务器返回库位"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_server_response_pos
,
"等待服务器返回库位"
)
,
MsgLevel
.
info
);
break
;
case
MoveStep
.
WaitInStore
:
Msg
.
add
(
"料盘等待入库"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
reel_wait_in_store
,
"料盘等待入库"
)
,
MsgLevel
.
info
);
break
;
case
MoveStep
.
ReelTaked
:
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
...
...
@@ -231,15 +232,15 @@ namespace DeviceLibrary
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_03
);
if
(
IOValue
(
IO_Type
.
NGDoor_Tray_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
"请检查单料口有无料盘"
,
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"传感器X29未检测到单料口料盘."
)
,
MsgLevel
.
alarm
);
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
RobotManage
.
UserPause
(
"
请检查单料口有无
料盘"
);
RobotManage
.
UserPause
(
"
传感器X29未检测到单料口
料盘"
);
}
break
;
case
MoveStep
.
NGOUT_03
:
if
(
IOValue
(
IO_Type
.
NGDoor_Tray_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"等待取走单口料盘"
,
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
please_take_ngdoor_reel
,
"等待取走单口料盘"
)
,
MsgLevel
.
alarm
);
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
RobotManage
.
UserPause
(
"等待取走单口料盘"
);
}
...
...
@@ -252,7 +253,7 @@ namespace DeviceLibrary
case
MoveStep
.
NGOUT_04
:
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
"等待手离开光栅"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_put_reel_into_ngdoor
,
"等待阻挡物离开光栅"
)
,
MsgLevel
.
warning
);
}
else
{
...
...
@@ -274,7 +275,7 @@ namespace DeviceLibrary
}
else
{
Msg
.
add
(
"等待手离开光栅"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_put_reel_into_ngdoor
,
"等待阻挡物离开光栅"
)
,
MsgLevel
.
warning
);
}
break
;
case
MoveStep
.
SingleIn
:
...
...
@@ -288,7 +289,7 @@ namespace DeviceLibrary
CylinderMove
(
ClampMoveInfo
,
IO_Type
.
NGDoor_Close
,
IO_Type
.
NGDoor_Open
,
IO_VALUE
.
HIGH
);
break
;
case
MoveStep
.
SingleInReady
:
Msg
.
add
(
"等待放入单盘入库料盘"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_put_reel_into_ngdoor
,
"等待放入单盘入库料盘"
)
,
MsgLevel
.
warning
);
break
;
case
MoveStep
.
SingleInRun
:
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelClamp_09
);
...
...
@@ -324,19 +325,19 @@ namespace DeviceLibrary
string
state
=
""
;
if
(
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
return
"空闲中"
;
return
crc
.
GetString
(
L
.
free
,
"空闲中"
)
;
}
else
if
(
ClampMoveInfo
.
MoveStep
>
MoveStep
.
NGOUT_01
)
{
state
=
"单料口:"
+
ClampMoveInfo
.
MoveParam
.
NgMsg
;
state
=
crc
.
GetString
(
L
.
ngdoor
,
"单料口:"
)
+
ClampMoveInfo
.
MoveParam
.
NgMsg
;
}
else
if
(
ClampMoveInfo
.
MoveStep
>=
MoveStep
.
ReelClamp_09
)
{
return
"扫码中"
;
return
crc
.
GetString
(
L
.
scanning_code
,
"扫码中"
)
;
}
else
if
(
ClampMoveInfo
.
MoveStep
>=
MoveStep
.
ReelClamp_01
)
{
return
"取料中"
;
return
crc
.
GetString
(
L
.
taking_code
,
"取料中"
)
;
}
return
state
;
}
...
...
DeviceLibrary/theMachine/MainMachine_ServerControl.cs
查看文件 @
6e8922c
...
...
@@ -62,6 +62,7 @@ namespace DeviceLibrary
StringMoveInfo
.
LastSetpTime
=
DateTime
.
Now
;
StringMoveInfo
.
IsInWait
=
true
;
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
))
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
HIGH
);
return
"开始打开折叠门"
;
...
...
@@ -81,6 +82,7 @@ namespace DeviceLibrary
//RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep);
StringMoveInfo
.
LastSetpTime
=
DateTime
.
Now
;
StringMoveInfo
.
IsInWait
=
true
;
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
))
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
LOW
);
return
$
"批量料门关闭"
;
}
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -40,7 +41,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
PlateH
=
56
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
7
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
"无信息料盘出库"
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
no_info_reel
,
"无信息料盘出库"
)
;
StoreMoveInfo
.
log
(
$
"开始无信息料盘出库"
);
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
CloseFlipDoor
(
StoreMoveInfo
);
...
...
@@ -62,7 +63,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
"单盘出库"
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
L
.
ngdoor_reel_out
,
"单盘出库"
)
;
StoreMoveInfo
.
log
(
$
"开始单盘出库任务:"
+
jobInfo
.
ToStr
());
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
CloseFlipDoor
(
StoreMoveInfo
);
...
...
@@ -100,7 +101,7 @@ namespace DeviceLibrary
}
else
{
Msg
.
add
(
"翻板门等待料盘离开"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_reel_transfer
,
"单料口等待料盘离开."
)
,
MsgLevel
.
info
);
}
break
;
case
MoveStep
.
StoreIn04
:
...
...
@@ -131,7 +132,7 @@ namespace DeviceLibrary
}
else
{
Msg
.
add
(
"等待料盘到达"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_reel_transfer
,
"等待料盘到达."
)
,
MsgLevel
.
info
);
}
break
;
case
MoveStep
.
StoreOut12
:
...
...
@@ -160,14 +161,14 @@ namespace DeviceLibrary
}
}
string
StoreState
()
{
string
state
=
"空闲中"
;
string
state
=
crc
.
GetString
(
L
.
free
,
"空闲中"
)
;
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
)
{
state
=
$
"
出库中,库位号
:{StoreMoveInfo.MoveParam.PosID}"
;
state
=
$
"
{crc.GetString(L.reel_outting, "
出库中
")},{crc.GetString(L.posnum, "
出库中
")}
:{StoreMoveInfo.MoveParam.PosID}"
;
}
else
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreIn01
)
{
state
=
$
"
入库中,库位号
:{StoreMoveInfo.MoveParam.PosID}"
;
state
=
$
"
{crc.GetString(L.reel_ining, "
入库中
")},{crc.GetString(L.posnum, "
出库中
")}
:{StoreMoveInfo.MoveParam.PosID}"
;
}
return
state
;
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -84,14 +85,14 @@ namespace DeviceLibrary
StringState
=
StringStateE
.
Empty
;
}
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
)){
Msg
.
add
(
"当前没有料串"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
no_string
,
"当前没有料串"
)
,
MsgLevel
.
info
);
StringMoveInfo
.
log
(
$
"当前没有料串"
);
StringState
=
StringStateE
.
None
;
LastStringState
=
StringStateE
.
None
;
}
else
if
(
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
"感应到料串"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
detect_string
,
"感应到料串"
)
,
MsgLevel
.
info
);
StringMoveInfo
.
log
(
$
"感应到料串"
);
Line
.
LineRun
(
"n"
,
false
,
2
);
}
...
...
@@ -128,7 +129,7 @@ namespace DeviceLibrary
downCheck2
=
false
;
break
;
case
MoveStep
.
StringLoad_03
:
if
(
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
...
...
@@ -137,7 +138,7 @@ namespace DeviceLibrary
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
{
Msg
.
add
(
"等待关门"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
)
,
MsgLevel
.
warning
);
StringMoveInfo
.
log
(
$
"等待关门"
);
}
break
;
...
...
@@ -202,7 +203,7 @@ namespace DeviceLibrary
}
break
;
case
MoveStep
.
StringReadyGet
:
Msg
.
add
(
"料串取料准备就绪"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
string_ready_for_get
,
"料串取料准备就绪"
)
,
MsgLevel
.
info
);
break
;
case
MoveStep
.
StringReelGet
:
StringMoveInfo
.
log
(
$
"料已取走,开始测高"
);
...
...
@@ -219,7 +220,7 @@ namespace DeviceLibrary
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos1
,
Config
.
Batch_P1
);
break
;
case
MoveStep
.
StringReadyPut
:
Msg
.
add
(
"料串放料准备就绪"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
string_ready_for_put
,
"料串放料准备就绪"
)
,
MsgLevel
.
info
);
StringMoveInfo
.
log
(
$
"料串放料准备就绪"
);
break
;
case
MoveStep
.
StringReelPut
:
...
...
@@ -286,17 +287,17 @@ namespace DeviceLibrary
}
break
;
case
MoveStep
.
StringOut_05
:
if
(
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StringMoveInfo
.
log
(
$
"折叠门已关闭"
);
}
else
{
Msg
.
add
(
"等待关闭折叠门"
,
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
),
MsgLevel
.
info
);
}
break
;
case
MoveStep
.
StringOut_06
:
if
(
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StringMoveInfo
.
log
(
$
"料串未拿走,直接关门"
);
...
...
@@ -307,7 +308,7 @@ namespace DeviceLibrary
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
30
))
{
StringMoveInfo
.
log
(
$
"等待料串被取走超时"
);
Msg
.
add
(
"等待料串被取走"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_string_take
,
"等待料串被取走"
)
,
MsgLevel
.
warning
);
}
break
;
case
MoveStep
.
StringOut_07
:
...
...
@@ -325,25 +326,25 @@ namespace DeviceLibrary
string
state
=
""
;
if
(
StringState
==
StringStateE
.
Empty
)
state
=
"空料串"
;
state
=
crc
.
GetString
(
L
.
empty_reel
,
"空料串"
)
;
else
if
(
StringState
==
StringStateE
.
Full
)
state
=
"满料串"
;
state
=
crc
.
GetString
(
L
.
full_reel
,
"满料串"
)
;
else
if
(
StringState
==
StringStateE
.
HasReel
)
state
=
"入库料串"
;
state
=
crc
.
GetString
(
L
.
instore_reel
,
"入库料串"
)
;
else
if
(
StringState
==
StringStateE
.
None
)
state
=
"无料串"
;
state
=
crc
.
GetString
(
L
.
no_string
,
"无料串"
)
;
if
(
StringMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
return
"空闲中"
;
return
crc
.
GetString
(
L
.
free
,
"空闲中"
)
;
}
else
if
(
StringMoveInfo
.
MoveStep
<=
MoveStep
.
StringLoad_06
)
{
return
"料串准备中"
;
return
crc
.
GetString
(
L
.
string_prepare
,
"料串准备中"
)
;
}
else
if
(
StringMoveInfo
.
MoveStep
>=
MoveStep
.
StringOut_01
)
{
return
"料串释放中"
;
return
crc
.
GetString
(
L
.
string_releasing
,
"料串释放中"
)
;
}
else
if
(
StringMoveInfo
.
MoveStep
>
MoveStep
.
StringLoad_06
)
{
...
...
DeviceLibrary/theMachine/MoveInfo.cs
查看文件 @
6e8922c
...
...
@@ -22,6 +22,12 @@ namespace DeviceLibrary
List
.
Add
(
this
);
}
public
MoveInfo
(
object
p
,
string
v
)
{
this
.
p
=
p
;
this
.
v
=
v
;
}
public
string
Name
{
get
;
set
;
}
public
DateTime
LastSetpTime
{
get
;
set
;
}
public
bool
OneWaitCanEndStep
=
false
;
...
...
@@ -116,6 +122,9 @@ namespace DeviceLibrary
}
string
lasterrmsg
=
""
;
private
object
p
;
private
string
v
;
public
void
errlog
(
string
msg
)
{
msg
=
$
"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}"
;
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
6e8922c
using
OnlineStore.Common
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -52,7 +53,7 @@ namespace DeviceLibrary
}
else
{
IsLoadOk
=
false
;
msg
+=
"找不到库位配置文件
\n"
;
msg
+=
crc
.
GetString
(
L
.
cant_find_storeposfile
,
"找不到库位配置文件"
)+
"
\n"
;
}
...
...
@@ -62,7 +63,7 @@ namespace DeviceLibrary
if
(!
IOManager
.
ConnectionIOList
(
new
List
<
string
>()))
{
IsLoadOk
=
false
;
msg
+=
"IO板卡初始化失败
\n"
;
msg
+=
crc
.
GetString
(
L
.
iocard_init_fail
,
"IO板卡初始化失败"
)+
"
\n"
;
}
if
(!
CameraA
.
LoadCameraConfig
(
"CameraA"
,
out
string
errmsg
))
{
...
...
@@ -71,7 +72,7 @@ namespace DeviceLibrary
}
if
(!
HumitureController
.
Init
(
ConfigHelper
.
Config
.
Get
(
"Device_Humiture_Port"
)))
{
IsLoadOk
=
false
;
msg
+=
$
"温湿度传感器初始化失败,端口:
{ConfigHelper.Config.Get("
Device_Humiture_Port
")}\n"
;
msg
+=
crc
.
GetString
(
L
.
tempnhum_sensor_init_fail
,
$
"温湿度传感器初始化失败,端口:"
)+
$
"
{ConfigHelper.Config.Get("
Device_Humiture_Port
")}\n"
;
}
IOManager
.
IOMove
(
IO_Type
.
Device_Led
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
...
...
@@ -84,7 +85,7 @@ namespace DeviceLibrary
LoadFinishEvent
?.
Invoke
(
IsConfigMode
?
IsConfigMode
:
IsLoadOk
,
msg
);
}
public
static
void
LoadDebug
()
{
LoadFinishEvent
?.
Invoke
(
true
,
"打开调试模式"
);
LoadFinishEvent
?.
Invoke
(
true
,
crc
.
GetString
(
L
.
open_debug_mode
,
"打开调试模式"
)
);
}
public
static
void
Start
()
{
//Init();
...
...
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
查看文件 @
6e8922c
...
...
@@ -165,9 +165,10 @@
this
.
lblAlarmcode
.
Location
=
new
System
.
Drawing
.
Point
(
433
,
65
);
this
.
lblAlarmcode
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
2
,
0
,
2
,
0
);
this
.
lblAlarmcode
.
Name
=
"lblAlarmcode"
;
this
.
lblAlarmcode
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
lblAlarmcode
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
17
);
this
.
lblAlarmcode
.
TabIndex
=
19
;
this
.
lblAlarmcode
.
Text
=
"错误码:160"
;
this
.
lblAlarmcode
.
Tag
=
"not"
;
this
.
lblAlarmcode
.
Text
=
"ErrCode:160"
;
this
.
lblAlarmcode
.
Visible
=
false
;
//
// label4
...
...
@@ -188,6 +189,7 @@
this
.
lblhomeSts
.
Name
=
"lblhomeSts"
;
this
.
lblhomeSts
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblhomeSts
.
TabIndex
=
17
;
this
.
lblhomeSts
.
Tag
=
"not"
;
this
.
lblhomeSts
.
Text
=
"..."
;
//
// label2
...
...
@@ -209,6 +211,7 @@
this
.
lblAxEncAcc
.
Name
=
"lblAxEncAcc"
;
this
.
lblAxEncAcc
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblAxEncAcc
.
TabIndex
=
12
;
this
.
lblAxEncAcc
.
Tag
=
"not"
;
this
.
lblAxEncAcc
.
Text
=
"..."
;
this
.
lblAxEncAcc
.
Visible
=
false
;
//
...
...
@@ -350,6 +353,7 @@
this
.
lblAxEncVel
.
Name
=
"lblAxEncVel"
;
this
.
lblAxEncVel
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblAxEncVel
.
TabIndex
=
1
;
this
.
lblAxEncVel
.
Tag
=
"not"
;
this
.
lblAxEncVel
.
Text
=
"..."
;
//
// lblAxPrfVel
...
...
@@ -360,6 +364,7 @@
this
.
lblAxPrfVel
.
Name
=
"lblAxPrfVel"
;
this
.
lblAxPrfVel
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblAxPrfVel
.
TabIndex
=
1
;
this
.
lblAxPrfVel
.
Tag
=
"not"
;
this
.
lblAxPrfVel
.
Text
=
"..."
;
//
// lblAxEncPos
...
...
@@ -370,6 +375,7 @@
this
.
lblAxEncPos
.
Name
=
"lblAxEncPos"
;
this
.
lblAxEncPos
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblAxEncPos
.
TabIndex
=
1
;
this
.
lblAxEncPos
.
Tag
=
"not"
;
this
.
lblAxEncPos
.
Text
=
"..."
;
//
// lblAxPrfPos
...
...
@@ -380,6 +386,7 @@
this
.
lblAxPrfPos
.
Name
=
"lblAxPrfPos"
;
this
.
lblAxPrfPos
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblAxPrfPos
.
TabIndex
=
1
;
this
.
lblAxPrfPos
.
Tag
=
"not"
;
this
.
lblAxPrfPos
.
Text
=
"..."
;
//
// lblAxisPrfMode
...
...
@@ -390,6 +397,7 @@
this
.
lblAxisPrfMode
.
Name
=
"lblAxisPrfMode"
;
this
.
lblAxisPrfMode
.
Size
=
new
System
.
Drawing
.
Size
(
17
,
17
);
this
.
lblAxisPrfMode
.
TabIndex
=
1
;
this
.
lblAxisPrfMode
.
Tag
=
"not"
;
this
.
lblAxisPrfMode
.
Text
=
"..."
;
//
// label50
...
...
@@ -424,6 +432,7 @@
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
135
,
260
);
this
.
groupBox1
.
TabIndex
=
302
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Tag
=
"not"
;
this
.
groupBox1
.
Text
=
"状态"
;
//
// txtBusyStatus
...
...
@@ -613,6 +622,7 @@
this
.
comjSpeed
.
Name
=
"comjSpeed"
;
this
.
comjSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
28
);
this
.
comjSpeed
.
TabIndex
=
335
;
this
.
comjSpeed
.
Tag
=
"not"
;
//
// btnComAlarmClear
//
...
...
@@ -742,6 +752,7 @@
this
.
txtASpeed
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
txtASpeed
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
26
);
this
.
txtASpeed
.
TabIndex
=
251
;
this
.
txtASpeed
.
Tag
=
"not"
;
this
.
txtASpeed
.
Text
=
"200"
;
//
// label1
...
...
@@ -833,6 +844,7 @@
this
.
lblCountPulse
.
ReadOnly
=
true
;
this
.
lblCountPulse
.
Size
=
new
System
.
Drawing
.
Size
(
118
,
26
);
this
.
lblCountPulse
.
TabIndex
=
38
;
this
.
lblCountPulse
.
Tag
=
"not"
;
//
// btnAxisAMove
//
...
...
@@ -874,6 +886,7 @@
this
.
txtAPosition
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
txtAPosition
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
26
);
this
.
txtAPosition
.
TabIndex
=
244
;
this
.
txtAPosition
.
Tag
=
"not"
;
this
.
txtAPosition
.
Text
=
"3000"
;
//
// label46
...
...
@@ -923,6 +936,7 @@
this
.
txtAxisValue
.
ReadOnly
=
true
;
this
.
txtAxisValue
.
Size
=
new
System
.
Drawing
.
Size
(
50
,
26
);
this
.
txtAxisValue
.
TabIndex
=
242
;
this
.
txtAxisValue
.
Tag
=
"not"
;
this
.
txtAxisValue
.
Text
=
"0"
;
//
// txtAxisDeviceName
...
...
@@ -934,6 +948,7 @@
this
.
txtAxisDeviceName
.
ReadOnly
=
true
;
this
.
txtAxisDeviceName
.
Size
=
new
System
.
Drawing
.
Size
(
50
,
26
);
this
.
txtAxisDeviceName
.
TabIndex
=
241
;
this
.
txtAxisDeviceName
.
Tag
=
"not"
;
this
.
txtAxisDeviceName
.
Text
=
"0"
;
//
// lblServerOn
...
...
DeviceLibrary/userControl/AxisMoveControl.cs
查看文件 @
6e8922c
...
...
@@ -11,6 +11,7 @@ using OnlineStore.Common;
using
System.Threading
;
using
OnlineStore.LoadCSVLibrary
;
using
HuichuanLibrary
;
using
OnlineStore
;
namespace
DeviceLibrary
{
...
...
@@ -25,7 +26,16 @@ namespace DeviceLibrary
public
AxisMoveControl
()
{
InitializeComponent
();
crc
.
OpenResourceLog
=
true
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageProcess
(
this
);
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
crc
.
LanguageProcess
(
this
);
}
public
void
LoadData
(
List
<
AxisBean
>
axisList
,
bool
isHc
=
true
)
{
//this.boxBean = equipBase;
...
...
@@ -37,7 +47,7 @@ namespace DeviceLibrary
cmbAxis
.
Items
.
Clear
();
foreach
(
var
a
in
axisList
)
{
cmbAxis
.
Items
.
Add
(
a
.
Config
.
Explain
);
cmbAxis
.
Items
.
Add
(
crc
.
GetString
(
a
.
Config
.
ProName
,
a
.
Config
.
Explain
)
);
}
cmbAxis
.
SelectedIndex
=
0
;
currentAxis
=
axisList
[
0
];
...
...
@@ -224,8 +234,8 @@ namespace DeviceLibrary
comjSpeed
.
Items
.
Add
(
targetSpeed
*
i
/
10
);
}
comjSpeed
.
SelectedIndex
=
4
;
btnAddMove
.
Text
=
"点动+ "
;
btnDelMove
.
Text
=
"点动- "
;
//
btnAddMove.Text = "点动+ ";
//
btnDelMove.Text = "点动- ";
txtASpeed
.
Text
=
targetSpeed
.
ToString
();
int
SelIndex
=
cmbAxis
.
SelectedIndex
;
...
...
@@ -342,7 +352,7 @@ namespace DeviceLibrary
}
private
void
ReadAxisStatus
()
{
groupBox2
.
Text
=
cmbAxis
.
Text
+
"-
状态监控"
;
groupBox2
.
Text
=
cmbAxis
.
Text
+
"-
"
+
crc
.
GetString
(
L
.
AxisMoveControl_status_monitor
,
"状态监控"
)
;
//【1】更新轴号
short
axisNo
=
SlvAddr
;
if
(
axisNo
<
0
)
...
...
DeviceLibrary/userControl/AxisTipControl.Designer.cs
查看文件 @
6e8922c
...
...
@@ -50,6 +50,7 @@ partial class AxisTipControl
this
.
comjSpeed
.
Name
=
"comjSpeed"
;
this
.
comjSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
28
);
this
.
comjSpeed
.
TabIndex
=
339
;
this
.
comjSpeed
.
Tag
=
"not"
;
this
.
comjSpeed
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
comjSpeed_SelectedIndexChanged
);
//
// btnDelMove
...
...
@@ -98,6 +99,7 @@ partial class AxisTipControl
this
.
textBox_pos
.
Name
=
"textBox_pos"
;
this
.
textBox_pos
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox_pos
.
TabIndex
=
340
;
this
.
textBox_pos
.
Tag
=
"not"
;
//
// label_position
//
...
...
@@ -138,6 +140,7 @@ partial class AxisTipControl
this
.
flowLayoutPanel1
.
Name
=
"flowLayoutPanel1"
;
this
.
flowLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
230
,
74
);
this
.
flowLayoutPanel1
.
TabIndex
=
342
;
this
.
flowLayoutPanel1
.
Tag
=
"not"
;
//
// groupBox1
//
...
...
DeviceLibrary/userControl/AxisTipControl.cs
查看文件 @
6e8922c
using
DeviceLibrary
;
using
HuichuanLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
System
;
...
...
@@ -22,8 +23,14 @@ public partial class AxisTipControl : Form
this
.
Deactivate
+=
AxisTipControl_Deactivate
;
this
.
LostFocus
+=
AxisTipControl_LostFocus
;
this
.
TopMost
=
true
;
crc
.
OpenResourceLog
=
true
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageProcess
(
this
);
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
crc
.
LanguageProcess
(
this
);
}
private
void
AxisTipControl_LostFocus
(
object
sender
,
EventArgs
e
)
{
//this.Close();
...
...
SO1069MIMO语言.xlsx
0 → 100644
查看文件 @
6e8922c
此文件类型无法预览
TheMachine/AboutBox1.Designer.cs
查看文件 @
6e8922c
...
...
@@ -50,8 +50,7 @@ namespace TheMachine
this
.
tableLayoutPanel
.
Controls
.
Add
(
this
.
textBoxDescription
,
1
,
4
);
this
.
tableLayoutPanel
.
Controls
.
Add
(
this
.
okButton
,
1
,
5
);
this
.
tableLayoutPanel
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
10
);
this
.
tableLayoutPanel
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
tableLayoutPanel
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
8
);
this
.
tableLayoutPanel
.
Name
=
"tableLayoutPanel"
;
this
.
tableLayoutPanel
.
RowCount
=
6
;
this
.
tableLayoutPanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
...
...
@@ -60,30 +59,32 @@ namespace TheMachine
this
.
tableLayoutPanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel
.
Size
=
new
System
.
Drawing
.
Size
(
556
,
306
);
this
.
tableLayoutPanel
.
Size
=
new
System
.
Drawing
.
Size
(
417
,
245
);
this
.
tableLayoutPanel
.
TabIndex
=
0
;
//
// labelProductName
//
this
.
labelProductName
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
labelProductName
.
Location
=
new
System
.
Drawing
.
Point
(
8
0
,
0
);
this
.
labelProductName
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
8
,
0
,
4
,
0
);
this
.
labelProductName
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
20
);
this
.
labelProductName
.
Location
=
new
System
.
Drawing
.
Point
(
6
0
,
0
);
this
.
labelProductName
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
0
,
3
,
0
);
this
.
labelProductName
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
16
);
this
.
labelProductName
.
Name
=
"labelProductName"
;
this
.
labelProductName
.
Size
=
new
System
.
Drawing
.
Size
(
472
,
20
);
this
.
labelProductName
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
16
);
this
.
labelProductName
.
TabIndex
=
19
;
this
.
labelProductName
.
Tag
=
"not"
;
this
.
labelProductName
.
Text
=
"产品名称"
;
this
.
labelProductName
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// labelVersion
//
this
.
labelVersion
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
labelVersion
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
30
);
this
.
labelVersion
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
8
,
0
,
4
,
0
);
this
.
labelVersion
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
20
);
this
.
labelVersion
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
24
);
this
.
labelVersion
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
0
,
3
,
0
);
this
.
labelVersion
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
16
);
this
.
labelVersion
.
Name
=
"labelVersion"
;
this
.
labelVersion
.
Size
=
new
System
.
Drawing
.
Size
(
472
,
20
);
this
.
labelVersion
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
16
);
this
.
labelVersion
.
TabIndex
=
0
;
this
.
labelVersion
.
Tag
=
"not"
;
this
.
labelVersion
.
Text
=
"版本"
;
this
.
labelVersion
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
labelVersion
.
Click
+=
new
System
.
EventHandler
(
this
.
labelVersion_Click
);
...
...
@@ -91,23 +92,24 @@ namespace TheMachine
// labelCopyright
//
this
.
labelCopyright
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
labelCopyright
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
60
);
this
.
labelCopyright
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
8
,
0
,
4
,
0
);
this
.
labelCopyright
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
20
);
this
.
labelCopyright
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
48
);
this
.
labelCopyright
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
0
,
3
,
0
);
this
.
labelCopyright
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
16
);
this
.
labelCopyright
.
Name
=
"labelCopyright"
;
this
.
labelCopyright
.
Size
=
new
System
.
Drawing
.
Size
(
472
,
20
);
this
.
labelCopyright
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
16
);
this
.
labelCopyright
.
TabIndex
=
21
;
this
.
labelCopyright
.
Tag
=
"not"
;
this
.
labelCopyright
.
Text
=
"版权"
;
this
.
labelCopyright
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// labelCompanyName
//
this
.
labelCompanyName
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
labelCompanyName
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
90
);
this
.
labelCompanyName
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
8
,
0
,
4
,
0
);
this
.
labelCompanyName
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
20
);
this
.
labelCompanyName
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
72
);
this
.
labelCompanyName
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
0
,
3
,
0
);
this
.
labelCompanyName
.
MaximumSize
=
new
System
.
Drawing
.
Size
(
0
,
16
);
this
.
labelCompanyName
.
Name
=
"labelCompanyName"
;
this
.
labelCompanyName
.
Size
=
new
System
.
Drawing
.
Size
(
472
,
20
);
this
.
labelCompanyName
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
16
);
this
.
labelCompanyName
.
TabIndex
=
22
;
this
.
labelCompanyName
.
Text
=
"公司名称"
;
this
.
labelCompanyName
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
...
...
@@ -115,42 +117,41 @@ namespace TheMachine
// textBoxDescription
//
this
.
textBoxDescription
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
textBoxDescription
.
Location
=
new
System
.
Drawing
.
Point
(
80
,
124
);
this
.
textBoxDescription
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
8
,
4
,
4
,
4
);
this
.
textBoxDescription
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
99
);
this
.
textBoxDescription
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
,
3
,
3
,
3
);
this
.
textBoxDescription
.
Multiline
=
true
;
this
.
textBoxDescription
.
Name
=
"textBoxDescription"
;
this
.
textBoxDescription
.
ReadOnly
=
true
;
this
.
textBoxDescription
.
ScrollBars
=
System
.
Windows
.
Forms
.
ScrollBars
.
Both
;
this
.
textBoxDescription
.
Size
=
new
System
.
Drawing
.
Size
(
472
,
145
);
this
.
textBoxDescription
.
Size
=
new
System
.
Drawing
.
Size
(
354
,
116
);
this
.
textBoxDescription
.
TabIndex
=
23
;
this
.
textBoxDescription
.
TabStop
=
false
;
this
.
textBoxDescription
.
Tag
=
"not"
;
this
.
textBoxDescription
.
Text
=
"说明"
;
//
// okButton
//
this
.
okButton
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
okButton
.
DialogResult
=
System
.
Windows
.
Forms
.
DialogResult
.
Cancel
;
this
.
okButton
.
Location
=
new
System
.
Drawing
.
Point
(
452
,
277
);
this
.
okButton
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
okButton
.
Location
=
new
System
.
Drawing
.
Point
(
339
,
222
);
this
.
okButton
.
Name
=
"okButton"
;
this
.
okButton
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
25
);
this
.
okButton
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
20
);
this
.
okButton
.
TabIndex
=
24
;
this
.
okButton
.
Text
=
"确定
(&O)
"
;
this
.
okButton
.
Text
=
"确定"
;
this
.
okButton
.
Click
+=
new
System
.
EventHandler
(
this
.
okButton_Click
);
//
// AboutBox1
//
this
.
AcceptButton
=
this
.
okButton
;
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
8F
,
15
F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12
F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
580
,
326
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
435
,
261
);
this
.
Controls
.
Add
(
this
.
tableLayoutPanel
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedDialog
;
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
MaximizeBox
=
false
;
this
.
MinimizeBox
=
false
;
this
.
Name
=
"AboutBox1"
;
this
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
12
,
10
,
12
,
10
);
this
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
9
,
8
,
9
,
8
);
this
.
ShowIcon
=
false
;
this
.
ShowInTaskbar
=
false
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterParent
;
...
...
TheMachine/AboutBox1.cs
查看文件 @
6e8922c
using
System
;
using
OnlineStore
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Drawing
;
...
...
@@ -14,12 +15,18 @@ namespace TheMachine
public
AboutBox1
()
{
InitializeComponent
();
this
.
Text
=
String
.
Format
(
"
关于
{0}"
,
AssemblyTitle
);
this
.
Text
=
String
.
Format
(
"{0}"
,
AssemblyTitle
);
this
.
labelProductName
.
Text
=
AssemblyProduct
;
this
.
labelVersion
.
Text
=
String
.
Format
(
"
版本
{0}"
,
AssemblyVersion
);
this
.
labelVersion
.
Text
=
String
.
Format
(
"
Ver
{0}"
,
AssemblyVersion
);
this
.
labelCopyright
.
Text
=
AssemblyCopyright
;
this
.
labelCompanyName
.
Text
=
AssemblyCompany
;
this
.
textBoxDescription
.
Text
=
AssemblyDescription
;
this
.
Shown
+=
AboutBox1_Shown
;
}
private
void
AboutBox1_Shown
(
object
sender
,
EventArgs
e
)
{
crc
.
LanguageProcess
(
this
);
}
#
region
程序集特性访问器
...
...
TheMachine/App.config
查看文件 @
6e8922c
...
...
@@ -36,7 +36,7 @@
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"
[%date][%t]%-5p
%m%n"
/>
<
conversionPattern
value
=
"%m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
...
...
TheMachine/AxisControl.Designer.cs
查看文件 @
6e8922c
...
...
@@ -52,6 +52,7 @@ namespace TheMachine
this
.
axisMoveControl1
.
Name
=
"axisMoveControl1"
;
this
.
axisMoveControl1
.
Size
=
new
System
.
Drawing
.
Size
(
559
,
400
);
this
.
axisMoveControl1
.
TabIndex
=
0
;
this
.
axisMoveControl1
.
Tag
=
"not"
;
//
// configControl1
//
...
...
TheMachine/AxisControl.cs
查看文件 @
6e8922c
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -20,6 +21,12 @@ namespace TheMachine
{
InitializeComponent
();
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
RobotManage_LoadFinishEvent
(
true
,
""
);
}
private
void
RobotManage_LoadFinishEvent
(
bool
state
,
string
msg
)
...
...
TheMachine/Form1.Designer.cs
查看文件 @
6e8922c
此文件的差异被折叠,
点击展开。
TheMachine/Form1.cs
查看文件 @
6e8922c
...
...
@@ -24,10 +24,10 @@ namespace TheMachine
{
public
Form1
()
{
crc
.
OpenResourceLog
=
true
;
InitializeComponent
();
this
.
FormClosing
+=
Form1_FormClosing
;
this
.
Text
=
Config
.
Get
(
Setting_Init
.
App_Title
)
+
" "
+
Config
.
Get
(
"CID"
);
crc
.
OpenResourceLog
=
true
;
crc
.
GetLanguageEvent
+=
Crc_GetLanguageEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
t1
.
Interval
=
1000
;
...
...
@@ -38,7 +38,10 @@ namespace TheMachine
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
throw
new
NotImplementedException
();
if
(
tabc
.
TabCount
>
tabpagecount
)
addTablePage
();
LanguageProcess
();
}
private
string
Crc_GetLanguageEvent
()
...
...
@@ -115,7 +118,7 @@ namespace TheMachine
AlarmBuzzer
.
BuzzerStateChange
+=
AlarmBuzzer_BuzzerStateChange
;
RobotManage
.
LoadFinishEvent
+=
RobotManage_LoadFinishEvent
;
if
(!
Config
.
Get
(
"Device_DisableLogWindow"
,
true
))
AddForm
(
"
日志"
,
lc
);
AddForm
(
"
tab_log"
,
crc
.
GetString
(
L
.
tab_log
,
"日志"
)
,
lc
);
RobotManage
.
UserPauseSet
+=
RobotManage_UserPauseSet
;
...
...
@@ -126,14 +129,14 @@ namespace TheMachine
RobotManage
.
Init
();
});
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
DateTime
.
Now
.
ToString
(),
"设备加载中,请稍后..."
});
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
DateTime
.
Now
.
ToString
(),
crc
.
GetString
(
L
.
device_initializing
,
"设备加载中,请稍后..."
)
});
lvi
.
ForeColor
=
Color
.
DarkGreen
;
listView1
.
Items
.
Add
(
lvi
);
//while (!loadtask.IsCompleted) {
// Thread.Sleep(100);
// Application.DoEvents();
//}
p
anel1
.
Enabled
=
false
;
p
nl
.
Enabled
=
false
;
}
private
void
CameraA_camera_event
(
object
sender
,
Bitmap
e
)
...
...
@@ -166,10 +169,11 @@ namespace TheMachine
}
const
int
tabpagecount
=
4
;
void
addTablePage
()
{
AddForm
(
"IO调试"
,
ioc
);
AddForm
(
"伺服调试"
,
ac
);
AddForm
(
"库位调试"
,
bd
);
AddForm
(
"相关设置"
,
sc
);
AddForm
(
"tab_io"
,
crc
.
GetString
(
L
.
tab_io
,
"IO调试"
),
ioc
);
AddForm
(
"tab_axis"
,
crc
.
GetString
(
L
.
tab_axis
,
"伺服调试"
),
ac
);
AddForm
(
"tab_store"
,
crc
.
GetString
(
L
.
tab_store
,
"库位调试"
),
bd
);
AddForm
(
"tab_setting"
,
crc
.
GetString
(
L
.
tab_setting
,
"相关设置"
),
sc
);
crc
.
LanguageProcess
(
this
);
}
private
void
T1_Tick
(
object
sender
,
EventArgs
e
)
...
...
@@ -199,32 +203,36 @@ namespace TheMachine
this
.
ResumeLayout
(
true
);
}
private
void
AddForm
(
string
text
,
UserControl
form
)
private
void
AddForm
(
string
id
,
string
text
,
UserControl
form
)
{
foreach
(
TabPage
tp
in
tabc
.
TabPages
)
{
//text = text.PadLeft(10, ' ');
if
(
tp
.
Name
==
id
)
{
tp
.
Text
=
text
;
return
;
}
}
TabPage
lineTabPage
=
new
TabPage
(
text
);
// lineTabPage.AutoScroll = true;
//lineTabPage.Tag = robot;
lineTabPage
.
Name
=
id
;
Panel
linePan
=
new
Panel
();
linePan
.
Dock
=
DockStyle
.
Fill
;
linePan
.
AutoScroll
=
true
;
lineTabPage
.
Controls
.
Add
(
linePan
);
//form.FormBorderStyle = FormBorderStyle.None;
//form.TopLevel = false;
linePan
.
Controls
.
Add
(
form
);
form
.
Dock
=
DockStyle
.
Fill
;
linePan
.
Anchor
=
((
AnchorStyles
)((
AnchorStyles
.
Top
|
AnchorStyles
.
Right
|
AnchorStyles
.
Bottom
|
AnchorStyles
.
Left
)));
form
.
Anchor
=
((
AnchorStyles
)((
AnchorStyles
.
Top
|
AnchorStyles
.
Right
|
AnchorStyles
.
Bottom
|
AnchorStyles
.
Left
)));
form
.
Show
();
//tabPageList.Add(lineTabPage);
tabControl1
.
Controls
.
Add
(
lineTabPage
);
tabc
.
TabPages
.
Add
(
lineTabPage
);
}
private
void
启用调试模式
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
RobotManage
.
IsConfigMode
=
RobotManage
.
IsConfigMode
?
false
:
true
;
(
sender
as
ToolStripMenuItem
).
Text
=
!
RobotManage
.
IsConfigMode
?
"启用配置模式"
:
"停用配置模式"
;
(
sender
as
ToolStripMenuItem
).
Text
=
!
RobotManage
.
IsConfigMode
?
crc
.
GetString
(
L
.
enable_config_mode
,
"启用配置模式"
)
:
crc
.
GetString
(
L
.
disable_config_mode
,
"停用配置模式"
)
;
if
(
RobotManage
.
IsConfigMode
)
...
...
@@ -235,10 +243,10 @@ namespace TheMachine
}
else
{
var
tc
=
tab
Control1
.
TabPages
.
Count
;
var
tc
=
tab
c
.
TabPages
.
Count
;
for
(
int
i
=
1
;
i
<=
tabpagecount
;
i
++)
{
tab
Control1
.
TabPages
[
tc
-
i
].
Parent
=
null
;
tab
c
.
TabPages
[
tc
-
i
].
Parent
=
null
;
}
}
}
...
...
@@ -261,7 +269,7 @@ namespace TheMachine
return
;
}
启用调试模式
ToolStripMenuItem
.
Enabled
=
true
;
p
anel1
.
Enabled
=
true
;
p
nl
.
Enabled
=
true
;
if
(
state
)
{
btn_run
.
Enabled
=
true
;
...
...
@@ -334,7 +342,7 @@ namespace TheMachine
{
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
"急停中,无法启动"
,
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
device_suddenstop_cant_start
,
"急停中,无法启动"
)
,
MsgLevel
.
warning
);
MainMachine_ProcessMsgEvent
(
Msg
.
get
());
return
;
}
...
...
@@ -373,14 +381,14 @@ namespace TheMachine
if
(
e
)
{
userpause
=
true
;
(
btn_run
as
Button
).
Text
=
"恢复运行"
;
(
btn_run
as
Button
).
Text
=
crc
.
GetString
(
L
.
device_resume
,
"恢复运行"
)
;
(
btn_run
as
Button
).
BackColor
=
Color
.
LightGreen
;
cb_IgnoreSafecheck
.
Enabled
=
true
;
}
else
{
userpause
=
false
;
(
btn_run
as
Button
).
Text
=
"暂停运行"
;
(
btn_run
as
Button
).
Text
=
crc
.
GetString
(
L
.
device_pause
,
"暂停运行"
)
;
(
btn_run
as
Button
).
BackColor
=
Color
.
Yellow
;
cb_IgnoreSafecheck
.
Enabled
=
false
;
}
...
...
@@ -400,7 +408,7 @@ namespace TheMachine
userpause
=
false
;
Task
.
Run
(()
=>
{
RobotManage
.
Stop
();
});
btn_stop
.
Enabled
=
false
;
btn_run
.
Text
=
"启动"
;
btn_run
.
Text
=
crc
.
GetString
(
L
.
start
,
"启动"
)
;
btn_run
.
BackColor
=
Color
.
Transparent
;
cb_IgnoreSafecheck
.
Enabled
=
true
;
}
...
...
@@ -408,7 +416,7 @@ namespace TheMachine
private
void
退出
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(
RobotManage
.
isRunning
)
{
MessageBox
.
Show
(
"机器尚在运行,不能退出,请先停止运行."
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
device_isrunning_cant_exit
,
"机器尚在运行,不能退出,请先停止运行."
)
);
}
else
{
RobotManage
.
Stop
();
RobotManage
.
ShutDown
();
...
...
@@ -495,12 +503,12 @@ namespace TheMachine
{
if
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
MessageBox
.
Show
(
"料串已是释放状态"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
safty_releaseed_string
,
"料串已是释放状态"
)
);
return
;
}
else
if
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
>=
MoveStep
.
StringOut_01
)
{
MessageBox
.
Show
(
"正在执行料串释放"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
safty_releaseing_string
,
"正在执行料串释放"
)
);
return
;
}
...
...
@@ -514,7 +522,7 @@ namespace TheMachine
{
Invoke
((
EventHandler
)
delegate
{
(
sender
as
Button
).
Text
=
$
"料串等待释放中
({timeout / 2})"
;
(
sender
as
Button
).
Text
=
crc
.
GetString
(
L
.
safty_releaseing_string
,
$
"正在执行料串释放"
)+
$
"
({timeout / 2})"
;
});
}
var
step
=
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
;
...
...
@@ -534,7 +542,7 @@ namespace TheMachine
Invoke
((
EventHandler
)
delegate
{
//btn_releaseleftshelf.BackColor = Color.Transparent;
(
sender
as
Button
).
Text
=
"安全释放料串"
;
(
sender
as
Button
).
Text
=
crc
.
GetString
(
L
.
safty_release_string
,
"安全释放料串"
)
;
});
});
}
...
...
@@ -570,12 +578,15 @@ namespace TheMachine
crc
.
LanguageProcess
(
this
,
this
.
GetType
().
Name
);
crc
.
ProcessListItem
(
menuStrip1
.
Items
,
"menuStrip1"
);
listView1
.
Columns
[
1
].
Text
=
crc
.
GetString
(
"table_datetime"
,
"时间"
);
listView1
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"table_info"
,
"信息"
);
listView1
.
Columns
[
1
].
Text
=
crc
.
GetString
(
L
.
table_datetime
,
"时间"
);
listView1
.
Columns
[
2
].
Text
=
crc
.
GetString
(
L
.
table_info
,
"信息"
);
stateView
.
Columns
[
1
].
Text
=
crc
.
GetString
(
L
.
table_module
,
"模块"
);
stateView
.
Columns
[
2
].
Text
=
crc
.
GetString
(
L
.
table_step
,
"步骤"
);
stateView
.
Columns
[
3
].
Text
=
crc
.
GetString
(
L
.
table_info
,
"信息"
);
stateView
.
Columns
[
1
].
Text
=
crc
.
GetString
(
"table_module"
,
"模块"
);
stateView
.
Columns
[
2
].
Text
=
crc
.
GetString
(
"table_step"
,
"步骤"
);
stateView
.
Columns
[
3
].
Text
=
crc
.
GetString
(
"table_info"
,
"信息"
);
启用调试模式
ToolStripMenuItem
.
Text
=
!
RobotManage
.
IsConfigMode
?
crc
.
GetString
(
L
.
enable_config_mode
,
"启用配置模式"
)
:
crc
.
GetString
(
L
.
disable_config_mode
,
"停用配置模式"
);
btn_releasestring
.
Text
=
crc
.
GetString
(
L
.
safty_release_string
,
"安全释放料串"
);
}
private
void
简体中文
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
...
TheMachine/IOControls.cs
查看文件 @
6e8922c
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
...
...
@@ -59,7 +60,6 @@ namespace TheMachine
private
void
ioControl1_Load
(
object
sender
,
EventArgs
e
)
{
}
}
}
TheMachine/SettingControl.Designer.cs
查看文件 @
6e8922c
...
...
@@ -36,14 +36,18 @@ namespace TheMachine
this
.
button_positiontool
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lbl_hmdstate
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tp
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// chbAutoRun
//
this
.
chbAutoRun
.
AutoSize
=
true
;
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
44
,
186
);
this
.
tp
.
SetColumnSpan
(
this
.
chbAutoRun
,
2
);
this
.
chbAutoRun
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
130
);
this
.
chbAutoRun
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
chbAutoRun
.
Name
=
"chbAutoRun"
;
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
19
);
this
.
chbAutoRun
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
16
);
this
.
chbAutoRun
.
TabIndex
=
1
;
this
.
chbAutoRun
.
Text
=
"开机自启动"
;
this
.
chbAutoRun
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -52,27 +56,32 @@ namespace TheMachine
//
this
.
cb_tempsensorport
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_tempsensorport
.
FormattingEnabled
=
true
;
this
.
cb_tempsensorport
.
Location
=
new
System
.
Drawing
.
Point
(
157
,
23
);
this
.
cb_tempsensorport
.
Location
=
new
System
.
Drawing
.
Point
(
139
,
6
);
this
.
cb_tempsensorport
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
6
);
this
.
cb_tempsensorport
.
Name
=
"cb_tempsensorport"
;
this
.
cb_tempsensorport
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
2
3
);
this
.
cb_tempsensorport
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
2
0
);
this
.
cb_tempsensorport
.
TabIndex
=
2
;
this
.
cb_tempsensorport
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cb_tempsensorport_SelectedIndexChanged
);
//
// label_tempsensor
//
this
.
label_tempsensor
.
AutoSize
=
true
;
this
.
label_tempsensor
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
label_tempsensor
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
26
);
this
.
label_tempsensor
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
10
);
this
.
label_tempsensor
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
label_tempsensor
.
Name
=
"label_tempsensor"
;
this
.
label_tempsensor
.
Size
=
new
System
.
Drawing
.
Size
(
1
34
,
23
);
this
.
label_tempsensor
.
Size
=
new
System
.
Drawing
.
Size
(
1
07
,
12
);
this
.
label_tempsensor
.
TabIndex
=
3
;
this
.
label_tempsensor
.
Text
=
"温湿度控制器端口:"
;
this
.
label_tempsensor
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// button_positiontool
//
this
.
button_positiontool
.
Location
=
new
System
.
Drawing
.
Point
(
44
,
129
);
this
.
tp
.
SetColumnSpan
(
this
.
button_positiontool
,
2
);
this
.
button_positiontool
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
74
);
this
.
button_positiontool
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
button_positiontool
.
Name
=
"button_positiontool"
;
this
.
button_positiontool
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
3
8
);
this
.
button_positiontool
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
3
6
);
this
.
button_positiontool
.
TabIndex
=
4
;
this
.
button_positiontool
.
Text
=
"库位定位辅助工具"
;
this
.
button_positiontool
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -81,10 +90,13 @@ namespace TheMachine
// lbl_hmdstate
//
this
.
lbl_hmdstate
.
AutoSize
=
true
;
this
.
lbl_hmdstate
.
Location
=
new
System
.
Drawing
.
Point
(
41
,
49
);
this
.
tp
.
SetColumnSpan
(
this
.
lbl_hmdstate
,
2
);
this
.
lbl_hmdstate
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
42
);
this
.
lbl_hmdstate
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
10
);
this
.
lbl_hmdstate
.
Name
=
"lbl_hmdstate"
;
this
.
lbl_hmdstate
.
Size
=
new
System
.
Drawing
.
Size
(
67
,
15
);
this
.
lbl_hmdstate
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
lbl_hmdstate
.
TabIndex
=
5
;
this
.
lbl_hmdstate
.
Tag
=
"not"
;
this
.
lbl_hmdstate
.
Text
=
"当前状态"
;
//
// timer1
...
...
@@ -92,17 +104,40 @@ namespace TheMachine
this
.
timer1
.
Enabled
=
true
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// tp
//
this
.
tp
.
AutoSize
=
true
;
this
.
tp
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
AutoSizeMode
.
GrowAndShrink
;
this
.
tp
.
ColumnCount
=
2
;
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tp
.
Controls
.
Add
(
this
.
label_tempsensor
,
0
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
cb_tempsensorport
,
1
,
0
);
this
.
tp
.
Controls
.
Add
(
this
.
chbAutoRun
,
0
,
6
);
this
.
tp
.
Controls
.
Add
(
this
.
button_positiontool
,
0
,
5
);
this
.
tp
.
Controls
.
Add
(
this
.
lbl_hmdstate
,
0
,
4
);
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
tp
.
Name
=
"tp"
;
this
.
tp
.
RowCount
=
7
;
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
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
266
,
156
);
this
.
tp
.
TabIndex
=
6
;
//
// SettingControl
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
lbl_hmdstate
);
this
.
Controls
.
Add
(
this
.
button_positiontool
);
this
.
Controls
.
Add
(
this
.
label_tempsensor
);
this
.
Controls
.
Add
(
this
.
cb_tempsensorport
);
this
.
Controls
.
Add
(
this
.
chbAutoRun
);
this
.
Controls
.
Add
(
this
.
tp
);
this
.
Name
=
"SettingControl"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
1024
,
740
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
SettingControl_Load
);
this
.
tp
.
ResumeLayout
(
false
);
this
.
tp
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
@@ -115,5 +150,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
Button
button_positiontool
;
private
System
.
Windows
.
Forms
.
Label
lbl_hmdstate
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
}
}
TheMachine/SettingControl.cs
查看文件 @
6e8922c
using
CodeLibrary
;
using
ConfigHelper
;
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.ACSingleStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
...
...
@@ -103,14 +104,14 @@ namespace TheMachine
if
(!
Visible
)
return
;
lbl_hmdstate
.
Text
=
"当前状态:"
;
lbl_hmdstate
.
Text
=
crc
.
GetString
(
L
.
current_status
,
"当前状态:"
)
;
if
(!
HumitureController
.
IsRun
)
{
lbl_hmdstate
.
Text
+=
"未成功连接"
;
lbl_hmdstate
.
Text
+=
crc
.
GetString
(
L
.
connect_fail
,
"未成功连接"
)
;
return
;
}
var
t
=
HumitureController
.
LastData
;
lbl_hmdstate
.
Text
+=
$
"
温度:{t.Temperate}℃, 湿度
:{t.Humidity}%"
;
lbl_hmdstate
.
Text
+=
$
"
{crc.GetString(L.humidity, "
温度
")}:{t.Temperate}℃, {crc.GetString(L.humidity, "
湿度
")}
:{t.Humidity}%"
;
}
}
}
TheMachine/UC/StorePosControl.cs
查看文件 @
6e8922c
...
...
@@ -39,7 +39,7 @@ namespace TheMachine
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
//
LoadPos(_aCStorePosition);
LoadPos
(
_aCStorePosition
);
}
private
ACStorePosition
_aCStorePosition
;
public
void
LoadPos
(
ACStorePosition
aCStorePosition
)
...
...
TheMachine/UC/uc_boxdebug.Designer.cs
查看文件 @
6e8922c
...
...
@@ -117,6 +117,7 @@ namespace TheMachine
this
.
label_size
.
Name
=
"label_size"
;
this
.
label_size
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
10
);
this
.
label_size
.
TabIndex
=
224
;
this
.
label_size
.
Tag
=
"not"
;
//
// cmbPosition
//
...
...
@@ -124,6 +125,7 @@ namespace TheMachine
this
.
cmbPosition
.
Name
=
"cmbPosition"
;
this
.
cmbPosition
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
11
);
this
.
cmbPosition
.
TabIndex
=
224
;
this
.
cmbPosition
.
Tag
=
"not"
;
//
// timer1
//
...
...
@@ -153,7 +155,7 @@ namespace TheMachine
this
.
dataGridView1
.
ShowCellToolTips
=
false
;
this
.
dataGridView1
.
ShowEditingIcon
=
false
;
this
.
dataGridView1
.
ShowRowErrors
=
false
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
785
,
250
);
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
981
,
250
);
this
.
dataGridView1
.
TabIndex
=
103
;
this
.
dataGridView1
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dataGridView1_CellContentClick
);
this
.
dataGridView1
.
CellMouseDown
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellMouseEventHandler
(
this
.
dataGridView1_CellMouseDown
);
...
...
@@ -164,6 +166,7 @@ namespace TheMachine
this
.
label_verify
.
Name
=
"label_verify"
;
this
.
label_verify
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
11
);
this
.
label_verify
.
TabIndex
=
224
;
this
.
label_verify
.
Tag
=
"not"
;
this
.
label_verify
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// storePosControl1
...
...
@@ -175,7 +178,7 @@ namespace TheMachine
this
.
storePosControl1
.
Name
=
"storePosControl1"
;
this
.
storePosControl1
.
Size
=
new
System
.
Drawing
.
Size
(
503
,
210
);
this
.
storePosControl1
.
TabIndex
=
225
;
this
.
storePosControl1
.
Tag
=
"
not
"
;
this
.
storePosControl1
.
Tag
=
""
;
//
// uc_boxdebug
//
...
...
TheMachine/UC/uc_boxdebug.cs
查看文件 @
6e8922c
using
DeviceLibrary
;
using
log4net
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
...
@@ -320,14 +321,14 @@ namespace TheMachine
string
selectPositionNum
=
cmbPosition
.
Text
;
JobInfo
jobInfo
=
new
JobInfo
(
"IN_TEST"
,
selectPositionNum
);
if
(!
RobotManage
.
mainMachine
.
StartInStore
(
jobInfo
))
{
MessageBox
.
Show
(
"料盘没有到位,无法手动入库"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
reel_not_onposition_cant_manual_in
,
"料盘没有到位,无法手动入库"
)
);
return
;
}
LogUtil
.
info
(
$
"手动入库:{selectPositionNum}"
);
}
else
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
start_device_first
,
"请先启动料仓!"
)
);
}
}
...
...
@@ -343,12 +344,12 @@ namespace TheMachine
}
else
{
MessageBox
.
Show
(
"料仓正在出入库中,无法手动出库"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
store_busy_cant_manual_out
,
"料仓正在出入库中,无法手动出库"
)
);
}
}
else
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
start_device_first
,
"请先启动料仓!"
)
);
}
}
...
...
@@ -377,13 +378,13 @@ namespace TheMachine
{
btnOutStore
.
Enabled
=
false
;
btnInStore
.
Enabled
=
false
;
btn_autoinout
.
Text
=
"停止自动库位测试"
;
btn_autoinout
.
Text
=
crc
.
GetString
(
L
.
stop_auto_test
,
"停止自动库位测试"
)
;
}
else
{
btnOutStore
.
Enabled
=
true
;
btnInStore
.
Enabled
=
true
;
btn_autoinout
.
Text
=
"自动库位测试"
;
btn_autoinout
.
Text
=
crc
.
GetString
(
L
.
start_auto_test
,
"自动库位测试"
)
;
}
}
private
void
dataGridView1_CellContentClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
...
...
@@ -419,13 +420,13 @@ namespace TheMachine
if
(
RobotManage
.
mainMachine
.
AutoInOutTest
)
{
RobotManage
.
mainMachine
.
StopAutoInOutTest
();
MessageBox
.
Show
(
"自动出入库过程会再料盘送至出口后自动停止"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
autotest_msg_01
,
"自动出入库过程会再料盘送至出口后自动停止."
)
);
return
;
}
if
(
RobotManage
.
mainMachine
.
runStatus
==
RunStatus
.
Running
)
{
DialogResult
res
=
MessageBox
.
Show
(
"确定开始自动库位测试?\n请确保料仓库位全部为空."
,
"提示"
,
MessageBoxButtons
.
YesNo
);
DialogResult
res
=
MessageBox
.
Show
(
crc
.
GetString
(
L
.
autotest_msg_02
,
"确定开始自动库位测试?\n请确保料仓库位全部为空."
),
crc
.
GetString
(
L
.
tips
,
"提示"
)
,
MessageBoxButtons
.
YesNo
);
if
(
res
==
DialogResult
.
No
)
return
;
int
posindex
=
RobotManage
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
...
...
@@ -434,11 +435,11 @@ namespace TheMachine
MessageBox
.
Show
(
errmsg
);
return
;
}
(
sender
as
Button
).
Text
=
"停止自动库位测试"
;
(
sender
as
Button
).
Text
=
crc
.
GetString
(
L
.
stop_inout_test
,
"停止自动库位测试!"
)
;
}
else
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
L
.
start_device_first
,
"请先启动料仓!"
)
);
}
}
...
...
TheMachine/positionTool/FrmPositionTool.Designer.cs
查看文件 @
6e8922c
...
...
@@ -115,6 +115,7 @@
this
.
txtLOffset
.
Name
=
"txtLOffset"
;
this
.
txtLOffset
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtLOffset
.
TabIndex
=
283
;
this
.
txtLOffset
.
Tag
=
"not"
;
this
.
txtLOffset
.
Text
=
"-200"
;
//
// label5
...
...
@@ -135,6 +136,7 @@
this
.
txtHOffset
.
Name
=
"txtHOffset"
;
this
.
txtHOffset
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtHOffset
.
TabIndex
=
281
;
this
.
txtHOffset
.
Tag
=
"not"
;
this
.
txtHOffset
.
Text
=
"200"
;
//
// label4
...
...
@@ -166,6 +168,7 @@
this
.
txtSpeed
.
Name
=
"txtSpeed"
;
this
.
txtSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtSpeed
.
TabIndex
=
83
;
this
.
txtSpeed
.
Tag
=
"not"
;
this
.
txtSpeed
.
Text
=
"20"
;
//
// label8
...
...
@@ -186,6 +189,7 @@
this
.
txtFileName
.
Name
=
"txtFileName"
;
this
.
txtFileName
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtFileName
.
TabIndex
=
278
;
this
.
txtFileName
.
Tag
=
"not"
;
this
.
txtFileName
.
Text
=
"position.csv"
;
//
// ioStatusControl1
...
...
@@ -238,6 +242,7 @@
this
.
txtPosition
.
Name
=
"txtPosition"
;
this
.
txtPosition
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtPosition
.
TabIndex
=
89
;
this
.
txtPosition
.
Tag
=
"not"
;
this
.
txtPosition
.
Text
=
"5000"
;
//
// txtActualPosition
...
...
@@ -249,6 +254,7 @@
this
.
txtActualPosition
.
Name
=
"txtActualPosition"
;
this
.
txtActualPosition
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtActualPosition
.
TabIndex
=
270
;
this
.
txtActualPosition
.
Tag
=
"not"
;
//
// label13
//
...
...
@@ -337,6 +343,7 @@
this
.
txtIOIndex
.
Name
=
"txtIOIndex"
;
this
.
txtIOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtIOIndex
.
TabIndex
=
275
;
this
.
txtIOIndex
.
Tag
=
"not"
;
this
.
txtIOIndex
.
Text
=
"1"
;
//
// label2
...
...
@@ -381,6 +388,7 @@
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
510
,
642
);
this
.
logBox
.
TabIndex
=
105
;
this
.
logBox
.
Tag
=
"not"
;
this
.
logBox
.
Text
=
""
;
//
// timer1
...
...
TheMachine/positionTool/FrmPositionTool.cs
查看文件 @
6e8922c
using
DeviceLibrary
;
using
DeviceLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
...
@@ -32,7 +31,7 @@ namespace OnlineStore.ACSingleStore
InitializeComponent
();
showLogProDelegate
=
new
ShowLogProDelegate
(
ShowLogPro
);
LogUtil
.
ShowLog
+=
LogUtil_ShowLog
;
this
.
Shown
+=
FrmPositionTool_Shown
;
this
.
UpDown_Axis
=
UpDown_Axis
;
this
.
iotype
=
iotype
;
PortName
=
UpDown_Axis
.
Config
.
DeviceName
;
...
...
@@ -45,22 +44,27 @@ namespace OnlineStore.ACSingleStore
FrmPositionTool
.
CheckForIllegalCrossThreadCalls
=
false
;
}
private
void
FrmPositionTool_Shown
(
object
sender
,
EventArgs
e
)
{
crc
.
LanguageProcess
(
this
);
}
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
CheckForIllegalCrossThreadCalls
=
false
;
txtIOIndex
.
Text
=
iotype
.
ToString
();
ConfigHelper
.
Config
.
PropertyBind
<
int
>(
"PositionTool_HOffset"
,
txtHOffset
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
int
>(
"PositionTool_LOffset"
,
txtLOffset
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
int
>(
"PositionTool_Target"
,
txtPosition
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
int
>(
"PositionTool_Speed"
,
txtSpeed
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
u
int
>(
"PositionTool_HOffset"
,
txtHOffset
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
u
int
>(
"PositionTool_LOffset"
,
txtLOffset
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
u
int
>(
"PositionTool_Target"
,
txtPosition
,
"Text"
,
"TextChanged"
);
ConfigHelper
.
Config
.
PropertyBind
<
u
int
>(
"PositionTool_Speed"
,
txtSpeed
,
"Text"
,
"TextChanged"
);
//判断伺服是否已经打开
bool
isOn
=
UpDown_Axis
.
IsServeoOn
;
formStatus
(
isOn
);
if
(
isOn
)
timer1
.
Start
();
ioStatusControl1
.
IOName
=
"检测信号"
;
ioStatusControl1
.
IOName
=
crc
.
GetString
(
L
.
detect_signal
,
"检测信号"
)
;
}
delegate
void
ShowLogProDelegate
(
string
msg
,
Color
color
);
...
...
@@ -291,7 +295,7 @@ namespace OnlineStore.ACSingleStore
var
homests
=
AxisManager
.
GetHomeEndStatus
(
PortName
,
SlvAddr
);
var
servisop
=
AxisManager
.
ServerOnStatus
(
PortName
,
SlvAddr
);
int
moveS
=
AxisManager
.
GetBusyStatus
(
PortName
,
SlvAddr
);
label_servosts
.
Text
=
$
"
伺服状态:{(servisop ? "
已使能
" : "
未使能
")}, 原点状态:{(homests == 3 ? "
已完成
" : "
未完成
")}, 忙碌状态:{(moveS == 1 ? "
忙碌中
" : "
空闲中
"
)}"
;
label_servosts
.
Text
=
$
"
{crc.GetString(L.FrmPositionTool_serv_state, "
伺服状态
")}:{(servisop ? crc.GetString(L.FrmPositionTool_enable, "
已使能
") : crc.GetString(L.FrmPositionTool_disable, "
未使能
"))}, {crc.GetString(L.FrmPositionTool_homests, "
原点状态
")}:{(homests == 3 ? crc.GetString(L.FrmPositionTool_finish, "
已完成
") : crc.GetString(L.FrmPositionTool_unfinish, "
未完成
"))}, {crc.GetString(L.FrmPositionTool_busysts, "
忙碌状态
")}:{(moveS == 1 ? crc.GetString(L.FrmPositionTool_busying, "
忙碌中
") : crc.GetString(L.free, "
空闲中
")
)}"
;
ioStatusControl1
.
IOValue
=
(
int
)
GetSingleValue
();
ioStatusControl1
.
ShowData
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论