添加中转点和破袋点
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import Constant
|
||||
import time
|
||||
|
||||
import Constant
|
||||
from Model.Position import Real_Position, Detection_Position
|
||||
from enum import Enum
|
||||
from COM.COM_Robot import RobotClient
|
||||
@ -15,13 +16,16 @@ class FeedStatus(Enum):
|
||||
FTake = 4
|
||||
FSafeF = 5
|
||||
FFeedP = 6
|
||||
FFinished = 7
|
||||
FBroken = 7
|
||||
FFinished = 8
|
||||
|
||||
class FeedLine:
|
||||
def __init__(self,name,safe_position:Real_Position,photo_position:Real_Position,feed_position:Real_Position):
|
||||
def __init__(self,name,safe_position:Real_Position,photo_position:Real_Position,mid_position:Real_Position,broken_position:Real_Position,feed_position:Real_Position):
|
||||
self.safe_position = safe_position
|
||||
self.photo_position = photo_position
|
||||
self.feed_position = feed_position
|
||||
self.mid_position = mid_position
|
||||
self.broken_position = broken_position
|
||||
self.take_position = None
|
||||
self.name = name
|
||||
|
||||
@ -87,7 +91,7 @@ class Feeding():
|
||||
from Trace.handeye_calibration import R_matrix,getPosition
|
||||
rotation = R_matrix(self.robotClient.status_model.world_0,
|
||||
self.robotClient.status_model.world_1,
|
||||
self.robotClient.status_model.world_2-5,
|
||||
self.robotClient.status_model.world_2-10,
|
||||
self.robotClient.status_model.world_3,
|
||||
self.robotClient.status_model.world_4,
|
||||
self.robotClient.status_model.world_5)
|
||||
@ -103,22 +107,28 @@ class Feeding():
|
||||
elif self.feedStatus == FeedStatus.FTake:
|
||||
if self.feedConfig.feedLine.take_position != None and self.feedConfig.feedLine.take_position.compare(real_position):
|
||||
self.feedStatus = FeedStatus.FSafeF
|
||||
time.sleep(2)
|
||||
self.sendTargPosition(self.feedConfig.feedLine.safe_position)
|
||||
time.sleep(1)
|
||||
self.sendTargPosition(self.feedConfig.feedLine.mid_position)
|
||||
pass #打开吸嘴并返回
|
||||
|
||||
elif self.feedStatus == FeedStatus.FSafeF:
|
||||
if self.feedConfig.feedLine.safe_position.compare(real_position):
|
||||
if self.feedConfig.feedLine.mid_position.compare(real_position):
|
||||
self.feedStatus = FeedStatus.FFeedP
|
||||
self.sendTargPosition(self.feedConfig.feedLine.feed_position)
|
||||
pass #吸嘴开始
|
||||
|
||||
|
||||
elif self.feedStatus==FeedStatus.FFeedP:
|
||||
if self.feedConfig.feed_position.compare(real_position):
|
||||
if self.feedConfig.feedLine.feed_position.compare(real_position):
|
||||
self.feedStatus = FeedStatus.FBroken
|
||||
self.sendTargPosition(self.feedConfig.feedLine.broken_position)
|
||||
pass #破袋
|
||||
|
||||
elif self.feedStatus==FeedStatus.FBroken:
|
||||
if self.feedConfig.feedLine.broken_position.compare(real_position):
|
||||
self.feedConfig.num = self.feedConfig.num-1
|
||||
if self.feedConfig.num == 0:
|
||||
self.feedStatus=FeedStatus.FNone
|
||||
self.sendTargPosition(self.feedConfig.feedLine.safe_position)
|
||||
else:
|
||||
self.feedStatus = FeedStatus.FSafeP
|
||||
self.sendTargPosition(self.feedConfig.feedLine.safe_position)
|
||||
|
||||
@ -12,12 +12,24 @@ photoposition_z = 737.267822
|
||||
photoposition_u = -2.196312
|
||||
photoposition_v = -4.094595
|
||||
photoposition_w = -5.294128
|
||||
feedposition_x = 392.634
|
||||
feedposition_y = 431.593
|
||||
feedposition_z = 238.453
|
||||
feedposition_u = -3.386
|
||||
feedposition_v = 8.849
|
||||
feedposition_w = 41.829
|
||||
midposition_x = 638.432
|
||||
midposition_y = 16.854
|
||||
midposition_z = 406.721
|
||||
midposition_u = -3.256
|
||||
midposition_v = 7.334
|
||||
midposition_w = -4.307
|
||||
brokenposition_x = 357.269
|
||||
brokenposition_y = 478.874
|
||||
brokenposition_z = 209.979
|
||||
brokenposition_u = -3.100
|
||||
brokenposition_v = -3.198
|
||||
brokenposition_w = 49.945
|
||||
feedposition_x = 315.549
|
||||
feedposition_y = 427.090
|
||||
feedposition_z = 209.985
|
||||
feedposition_u = -2.793
|
||||
feedposition_v = -1.829
|
||||
feedposition_w = 50.000
|
||||
|
||||
[FeedLine2]
|
||||
name = 反应釜2
|
||||
|
||||
@ -3704,3 +3704,121 @@ Error 2024-09-12 10:43:03:0056 DevID:MV-CA016-10GC(00DA0739806) Source-Line:
|
||||
Error 2024-09-12 10:43:04:0722 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14060) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 10:43:06:0392 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14060) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 10:43:08:0063 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14060) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Warning 2024-09-12 15:14:44:0580 DevID: Source-Line:MvCameraControl.dll(GenTLLoadLibraryEx.cpp-L0345) ProcessName:python.exe(14544) Description:[LoadCtiLibInter]MV_GCSetConfigIntValue is NULL, CTI path[C:\Users\H_w\.conda\envs\torch_v8\lib\site-packages\MvProducerVIR.dll]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0992) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MODEL] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0996) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_VERSION] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1000) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MANUFACTURER] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1004) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_USER_DEFINED_NAME] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0992) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MODEL] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0996) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_VERSION] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1000) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MANUFACTURER] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:14:44:0582 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1004) ProcessName:python.exe(14544) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_USER_DEFINED_NAME] failed, Ret[0x80000001]
|
||||
Error 2024-09-12 15:14:46:0101 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2939) ProcessName:python.exe(14544) Description:Get Node Value, NodeName[GammaEnable], AccessException[Node is not readable. : AccessException thrown in node 'GammaEnable' while calling 'GammaEnable.GetValue()' (file 'BooleanT.h', line 113)] Solution:
|
||||
Error 2024-09-12 15:14:46:0101 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0440) ProcessName:python.exe(14544) Description:[GetBoolValue]Property[GammaEnable], Ret[0x80000106]
|
||||
Warning 2024-09-12 15:14:46:0101 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L2145) ProcessName:python.exe(14544) Description:[RecordThreadProc][Record] Failed get GammaEnable value ,nRet [0x80000106]
|
||||
Error 2024-09-12 15:14:46:0102 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2779) ProcessName:python.exe(14544) Description:Get Node Value, NodeName[Gamma], AccessException[Node is not readable. : AccessException thrown in node 'Gamma' while calling 'Gamma.GetValue()' (file 'FloatT.h', line 291)] Solution:
|
||||
Error 2024-09-12 15:14:46:0102 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0381) ProcessName:python.exe(14544) Description:[GetFloatValue]Property[Gamma], Ret[0x80000106]
|
||||
Warning 2024-09-12 15:14:46:0102 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L2156) ProcessName:python.exe(14544) Description:[RecordThreadProc][Record] Failed get Gamma value, nRet[0x80000106]
|
||||
Error 2024-09-12 15:14:46:0526 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14544) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:14:47:0597 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2985) ProcessName:python.exe(14544) Description:Get Node Value, Node does not exist, NodeName[Function1Enable] Solution:
|
||||
Error 2024-09-12 15:14:47:0597 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0466) ProcessName:python.exe(14544) Description:[SetBoolValue]Property[Function1Enable], Value[0], Ret[0x80000100]
|
||||
Error 2024-09-12 15:14:47:0612 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0317) ProcessName:python.exe(14544) Description:[SetEnumValueByString]Property[ImageCompressionMode], Value[HB], Ret[0x80000004]
|
||||
Error 2024-09-12 15:14:47:0612 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2555) ProcessName:python.exe(14544) Description:Get Node Value, Node does not exist, NodeName[HighBandwidthMode] Solution:
|
||||
Error 2024-09-12 15:14:47:0612 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0317) ProcessName:python.exe(14544) Description:[SetEnumValueByString]Property[HighBandwidthMode], Value[Burst], Ret[0x80000100]
|
||||
Error 2024-09-12 15:14:47:0613 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2985) ProcessName:python.exe(14544) Description:Get Node Value, Node does not exist, NodeName[MaxFusionEnable] Solution:
|
||||
Error 2024-09-12 15:14:47:0613 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0466) ProcessName:python.exe(14544) Description:[SetBoolValue]Property[MaxFusionEnable], Value[1], Ret[0x80000100]
|
||||
Error 2024-09-12 15:14:47:0620 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0845) ProcessName:python.exe(14544) Description:[XML_GetNodeAccessMode]PropertyName[PartialImageOutputMode], Ret[0x80000100]
|
||||
Warning 2024-09-12 15:14:47:0651 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(StreamGrab.cpp-L2295) ProcessName:python.exe(14544) Description:[CreateISPHandle]ISP CreateHandle failed, nRet[8000000f]
|
||||
Error 2024-09-12 15:14:48:0158 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14544) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:14:49:0795 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14544) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:14:51:0429 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14544) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:14:53:0061 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(14544) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Warning 2024-09-12 15:39:43:0615 DevID: Source-Line:MvCameraControl.dll(GenTLLoadLibraryEx.cpp-L0345) ProcessName:python.exe(22436) Description:[LoadCtiLibInter]MV_GCSetConfigIntValue is NULL, CTI path[C:\Users\H_w\.conda\envs\torch_v8\lib\site-packages\MvProducerVIR.dll]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0992) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MODEL] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0996) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_VERSION] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1000) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MANUFACTURER] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual GigE Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1004) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_USER_DEFINED_NAME] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0992) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MODEL] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L0996) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_VERSION] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1000) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_MANUFACTURER] failed, Ret[0x80000001]
|
||||
Warning 2024-09-12 15:39:43:0618 DevID:Virtual USB3 Vision Source-Line:MvCameraControl.dll(GenTLManager.cpp-L1004) ProcessName:python.exe(22436) Description:[GetInterfaceInfos]TLGetInterfaceInfo[INTERFACE_INFO_USER_DEFINED_NAME] failed, Ret[0x80000001]
|
||||
Error 2024-09-12 15:39:45:0057 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2939) ProcessName:python.exe(22436) Description:Get Node Value, NodeName[GammaEnable], AccessException[Node is not readable. : AccessException thrown in node 'GammaEnable' while calling 'GammaEnable.GetValue()' (file 'BooleanT.h', line 113)] Solution:
|
||||
Error 2024-09-12 15:39:45:0057 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0440) ProcessName:python.exe(22436) Description:[GetBoolValue]Property[GammaEnable], Ret[0x80000106]
|
||||
Warning 2024-09-12 15:39:45:0057 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L2145) ProcessName:python.exe(22436) Description:[RecordThreadProc][Record] Failed get GammaEnable value ,nRet [0x80000106]
|
||||
Error 2024-09-12 15:39:45:0058 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2779) ProcessName:python.exe(22436) Description:Get Node Value, NodeName[Gamma], AccessException[Node is not readable. : AccessException thrown in node 'Gamma' while calling 'Gamma.GetValue()' (file 'FloatT.h', line 291)] Solution:
|
||||
Error 2024-09-12 15:39:45:0058 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0381) ProcessName:python.exe(22436) Description:[GetFloatValue]Property[Gamma], Ret[0x80000106]
|
||||
Warning 2024-09-12 15:39:45:0058 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L2156) ProcessName:python.exe(22436) Description:[RecordThreadProc][Record] Failed get Gamma value, nRet[0x80000106]
|
||||
Error 2024-09-12 15:39:45:0560 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:46:0539 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2985) ProcessName:python.exe(22436) Description:Get Node Value, Node does not exist, NodeName[Function1Enable] Solution:
|
||||
Error 2024-09-12 15:39:46:0539 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0466) ProcessName:python.exe(22436) Description:[SetBoolValue]Property[Function1Enable], Value[0], Ret[0x80000100]
|
||||
Error 2024-09-12 15:39:46:0554 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0317) ProcessName:python.exe(22436) Description:[SetEnumValueByString]Property[ImageCompressionMode], Value[HB], Ret[0x80000004]
|
||||
Error 2024-09-12 15:39:46:0554 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2555) ProcessName:python.exe(22436) Description:Get Node Value, Node does not exist, NodeName[HighBandwidthMode] Solution:
|
||||
Error 2024-09-12 15:39:46:0554 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0317) ProcessName:python.exe(22436) Description:[SetEnumValueByString]Property[HighBandwidthMode], Value[Burst], Ret[0x80000100]
|
||||
Error 2024-09-12 15:39:46:0554 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(XmlParse.cpp-L2985) ProcessName:python.exe(22436) Description:Get Node Value, Node does not exist, NodeName[MaxFusionEnable] Solution:
|
||||
Error 2024-09-12 15:39:46:0554 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0466) ProcessName:python.exe(22436) Description:[SetBoolValue]Property[MaxFusionEnable], Value[1], Ret[0x80000100]
|
||||
Error 2024-09-12 15:39:46:0559 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0845) ProcessName:python.exe(22436) Description:[XML_GetNodeAccessMode]PropertyName[PartialImageOutputMode], Ret[0x80000100]
|
||||
Warning 2024-09-12 15:39:46:0588 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(StreamGrab.cpp-L2295) ProcessName:python.exe(22436) Description:[CreateISPHandle]ISP CreateHandle failed, nRet[8000000f]
|
||||
Error 2024-09-12 15:39:47:0196 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:48:0852 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:50:0487 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:52:0116 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:53:0748 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:55:0379 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:57:0031 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:39:58:0660 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:00:0285 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:01:0917 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:03:0549 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:04:0681 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0845) ProcessName:python.exe(22436) Description:[XML_GetNodeAccessMode]PropertyName[PartialImageOutputMode], Ret[0x80000100]
|
||||
Warning 2024-09-12 15:40:04:0691 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(StreamGrab.cpp-L2295) ProcessName:python.exe(22436) Description:[CreateISPHandle]ISP CreateHandle failed, nRet[8000000f]
|
||||
Error 2024-09-12 15:40:05:0178 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:06:0875 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:08:0513 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:10:0143 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:11:0774 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:13:0402 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:15:0029 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:16:0659 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:18:0289 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:19:0920 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:21:0552 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:23:0184 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:24:0813 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:26:0446 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:28:0079 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:29:0716 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:31:0345 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:32:0979 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:34:0611 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:36:0250 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:37:0882 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:39:0513 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:41:0143 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:42:0776 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:44:0412 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:46:0044 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:47:0674 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:49:0307 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:50:0528 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GenICamImpl.cpp-L0845) ProcessName:python.exe(22436) Description:[XML_GetNodeAccessMode]PropertyName[PartialImageOutputMode], Ret[0x80000100]
|
||||
Warning 2024-09-12 15:40:50:0549 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(StreamGrab.cpp-L2295) ProcessName:python.exe(22436) Description:[CreateISPHandle]ISP CreateHandle failed, nRet[8000000f]
|
||||
Error 2024-09-12 15:40:50:0943 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:52:0598 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:54:0227 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:55:0862 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:57:0488 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:40:59:0121 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:00:0752 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:02:0389 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:04:0019 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:05:0650 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:07:0279 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:08:0907 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:10:0538 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:12:0169 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:13:0798 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:15:0434 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:17:0064 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:18:0694 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:20:0322 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:21:0960 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
Error 2024-09-12 15:41:23:0614 DevID:MV-CA016-10GC(00DA0739806) Source-Line:MvCameraControl.dll(GigEDevice.cpp-L0521) ProcessName:python.exe(22436) Description:[OpenDevice]Open device failed! PrivilegeMode[1], SwitchoverKey[0], Ret[0x80000203]
|
||||
|
||||
@ -18,6 +18,18 @@ def writeFeedLine_to_ini(feedLine_dirt,file_path:str):
|
||||
config.set(key,'PhotoPosition_u',str(value.photo_position.U))
|
||||
config.set(key,'PhotoPosition_v',str(value.photo_position.V))
|
||||
config.set(key, 'PhotoPosition_w', str(value.photo_position.W))
|
||||
config.set(key,'MidPosition_x',str(value.mid_position.X))
|
||||
config.set(key,'MidPosition_y',str(value.mid_position.Y))
|
||||
config.set(key,'MidPosition_z',str(value.mid_position.Z))
|
||||
config.set(key,'MidPosition_u',str(value.mid_position.U))
|
||||
config.set(key,'MidPosition_v',str(value.mid_position.V))
|
||||
config.set(key, 'BrokenPosition_w', str(value.broken_position.W))
|
||||
config.set(key, 'BrokenPosition_x', str(value.broken_position.X))
|
||||
config.set(key, 'BrokenPosition_y', str(value.broken_position.Y))
|
||||
config.set(key, 'BrokenPosition_z', str(value.broken_position.Z))
|
||||
config.set(key, 'BrokenPosition_u', str(value.broken_position.U))
|
||||
config.set(key, 'BrokenPosition_v', str(value.broken_position.V))
|
||||
config.set(key, 'BrokenPosition_w', str(value.broken_position.W))
|
||||
config.set(key,'FeedPosition_x',str(value.feed_position.X))
|
||||
config.set(key,'FeedPosition_y',str(value.feed_position.Y))
|
||||
config.set(key,'FeedPosition_z',str(value.feed_position.Z))
|
||||
|
||||
206
app.py
206
app.py
@ -17,9 +17,9 @@ from CU.Command import FeedCommand
|
||||
from CU.Feeding import FeedLine, FeedingConfig, Feeding, FeedStatus
|
||||
from Util.util_log import QTextEditLogger
|
||||
from Vision.camera_coordinate_dete import Detection
|
||||
from ui_untitled import Ui_MainWindow
|
||||
from ui_untitled import Ui_MainWindow
|
||||
from COM.COM_Robot import RobotClient
|
||||
from Expection import Error_Code
|
||||
from Expection import Error_Code
|
||||
from queue import Queue
|
||||
from Model.RobotModel import *
|
||||
import time
|
||||
@ -29,9 +29,7 @@ from threading import Thread
|
||||
from CU.Command import Status
|
||||
|
||||
|
||||
|
||||
|
||||
class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
def __init__(self):
|
||||
super(MainWindow, self).__init__()
|
||||
self.setupUi(self)
|
||||
@ -92,22 +90,19 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.pushButton_speed.clicked.connect(self.send_setSpeed_label_doubelClick)
|
||||
self.lineEdit_speed.returnPressed.connect(self.send_setSpeed_lineEdit_returePressed)
|
||||
|
||||
|
||||
|
||||
self.lineEdit_num.returnPressed.connect(self.send_custom_num_returnPressed)
|
||||
int_validator = QIntValidator(0, 100, self.lineEdit_num)
|
||||
self.lineEdit_num.setValidator(int_validator)
|
||||
|
||||
# self.horizontalSlider_J1.sliderReleased
|
||||
self.pushButton_startFeed.clicked.connect(self.send_startFeed_button_click)
|
||||
self.pushButton_stack_feedControl.clicked.connect(lambda _, index=0: self.send_stack_feedSet_button_click(index))
|
||||
self.pushButton_stack_feedSet.clicked.connect(lambda _,index=1:self.send_stack_feedSet_button_click(index))
|
||||
|
||||
self.pushButton_stack_feedControl.clicked.connect(
|
||||
lambda _, index=0: self.send_stack_feedSet_button_click(index))
|
||||
self.pushButton_stack_feedSet.clicked.connect(lambda _, index=1: self.send_stack_feedSet_button_click(index))
|
||||
|
||||
self.horizontalSlider_feedingNum.blockSignals(True)
|
||||
self.horizontalSlider_feedingNum.setMinimum(0)
|
||||
|
||||
|
||||
self.lineEdit_speed.hide()
|
||||
self.pushButton_stopFeed.hide()
|
||||
self.pushButton_pauseFeed.hide()
|
||||
@ -127,8 +122,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
port = int(self.configReader.get('Robot_Feed', 'Port'))
|
||||
|
||||
self.robotClient = RobotClient(ip, port, self.command_position_quene, self.status_address)
|
||||
self.feeding = Feeding(self.robotClient,self.detection) # 临时
|
||||
self.last_time=time.time()
|
||||
self.feeding = Feeding(self.robotClient, self.detection) # 临时
|
||||
self.last_time = time.time()
|
||||
|
||||
try:
|
||||
self.robotClient.CreatConnect()
|
||||
@ -142,18 +137,17 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
|
||||
def init_seting_frame(self):
|
||||
|
||||
rows = len(self.feedLine_dict.keys())+1
|
||||
rows = len(self.feedLine_dict.keys()) + 1
|
||||
self.tableWidget_feedSeting.setRowCount(rows)
|
||||
self.tableWidget_feedSeting.setColumnCount(19)
|
||||
# 设置第一重表头的合并 (三列一组)
|
||||
self.tableWidget_feedSeting_addtional_col_num = 2
|
||||
|
||||
self.tableWidget_feedSeting.setSpan(0, 0+self.tableWidget_feedSeting_addtional_col_num, 1, 6) # 合并前3列
|
||||
self.tableWidget_feedSeting.setSpan(0, 6+self.tableWidget_feedSeting_addtional_col_num, 1, 6) # 合并后3列
|
||||
self.tableWidget_feedSeting.setSpan(0, 12+self.tableWidget_feedSeting_addtional_col_num, 1, 6) # 合并后3列
|
||||
self.tableWidget_feedSeting.setSpan(0, 0 + self.tableWidget_feedSeting_addtional_col_num, 1, 6) # 合并前3列
|
||||
self.tableWidget_feedSeting.setSpan(0, 6 + self.tableWidget_feedSeting_addtional_col_num, 1, 6) # 合并后3列
|
||||
self.tableWidget_feedSeting.setSpan(0, 12 + self.tableWidget_feedSeting_addtional_col_num, 1, 6) # 合并后3列
|
||||
self.tableWidget_feedSeting.itemChanged.connect(self.send_tabelFeedSet_itemChanged)
|
||||
|
||||
|
||||
btn_safe = QPushButton("获取安全位置")
|
||||
|
||||
widget_safe = QWidget()
|
||||
@ -163,7 +157,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
layout_safe.setContentsMargins(0, 0, 0, 0)
|
||||
# 将布局设置到 QWidget 容器中
|
||||
widget_safe.setLayout(layout_safe)
|
||||
|
||||
|
||||
btn_photo = QPushButton("获取拍照位置")
|
||||
widget_photo = QWidget()
|
||||
layout_photo = QHBoxLayout()
|
||||
@ -172,8 +166,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
layout_photo.setContentsMargins(0, 0, 0, 0)
|
||||
# 将布局设置到 QWidget 容器中
|
||||
widget_photo.setLayout(layout_photo)
|
||||
|
||||
|
||||
|
||||
btn_feed = QPushButton("获取投料位置")
|
||||
widget_feed = QWidget()
|
||||
layout_feed = QHBoxLayout()
|
||||
@ -183,29 +176,31 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
# 将布局设置到 QWidget 容器中
|
||||
widget_feed.setLayout(layout_feed)
|
||||
|
||||
|
||||
btn_safe.clicked.connect(self.send_get_safe_position_button_click)
|
||||
btn_photo.clicked.connect(self.send_get_photo_position_button_click)
|
||||
btn_feed.clicked.connect(self.send_get_feed_position_button_click)
|
||||
# 添加第一重表头项
|
||||
|
||||
self.tableWidget_feedSeting.setCellWidget(0, 0+self.tableWidget_feedSeting_addtional_col_num, widget_safe)
|
||||
self.tableWidget_feedSeting.setCellWidget(0, 6+self.tableWidget_feedSeting_addtional_col_num, widget_photo)
|
||||
self.tableWidget_feedSeting.setCellWidget(0, 12+self.tableWidget_feedSeting_addtional_col_num, widget_feed) # 设置在合并的第2组
|
||||
self.tableWidget_feedSeting.setCellWidget(0, 0 + self.tableWidget_feedSeting_addtional_col_num, widget_safe)
|
||||
self.tableWidget_feedSeting.setCellWidget(0, 6 + self.tableWidget_feedSeting_addtional_col_num, widget_photo)
|
||||
self.tableWidget_feedSeting.setCellWidget(0, 12 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
widget_feed) # 设置在合并的第2组
|
||||
|
||||
self.tableWidget_feedSeting.setSelectionBehavior(QTableWidget.SelectRows)
|
||||
self.tableWidget_feedSeting.setAutoScroll(True)
|
||||
# 添加第二重表头
|
||||
self.tableWidget_feedSeting.setHorizontalHeaderLabels(['header','线名','X1','Y1','Z1','U1','V1','W1','X2','Y2','Z2','U2','V2','W2','X3','Y3','Z3','U3','V3','W3'])
|
||||
self.tableWidget_feedSeting.setHorizontalHeaderLabels(
|
||||
['header', '线名', 'X1', 'Y1', 'Z1', 'U1', 'V1', 'W1', 'X2', 'Y2', 'Z2', 'U2', 'V2', 'W2', 'X3', 'Y3', 'Z3',
|
||||
'U3', 'V3', 'W3'])
|
||||
|
||||
self.tableWidget_feedSeting.hideColumn(0)
|
||||
# 填充数据行
|
||||
for row,(feed_line_key,feed_line)in enumerate(self.feedLine_dict.items()):
|
||||
self.tableWidget_feedSeting.setItem(row+1, 0, QTableWidgetItem(feed_line_key))
|
||||
self.tableWidget_feedSeting.setItem(row+1, 1, QTableWidgetItem(feed_line.name))
|
||||
self.set_position_to_tabel(row+1, 0, feed_line.safe_position)
|
||||
self.set_position_to_tabel(row+1, 1, feed_line.photo_position)
|
||||
self.set_position_to_tabel(row+1, 2, feed_line.feed_position)
|
||||
for row, (feed_line_key, feed_line) in enumerate(self.feedLine_dict.items()):
|
||||
self.tableWidget_feedSeting.setItem(row + 1, 0, QTableWidgetItem(feed_line_key))
|
||||
self.tableWidget_feedSeting.setItem(row + 1, 1, QTableWidgetItem(feed_line.name))
|
||||
self.set_position_to_tabel(row + 1, 0, feed_line.safe_position)
|
||||
self.set_position_to_tabel(row + 1, 1, feed_line.photo_position)
|
||||
self.set_position_to_tabel(row + 1, 2, feed_line.feed_position)
|
||||
|
||||
# 禁用自动表头
|
||||
self.tableWidget_feedSeting.verticalHeader().setVisible(True)
|
||||
@ -213,17 +208,18 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.pushButton_tableFeedSet_deleRow.clicked.connect(self.send_tabelFeedSet_delRow)
|
||||
self.pushButton_tableFeedSet_save.clicked.connect(self.send_tabelFeedSet_save)
|
||||
|
||||
|
||||
def init_FeedLine(self):
|
||||
line_count = self.configReader.get('Robot_Feed', 'LineCount', fallback=0)
|
||||
self.configReader.read(Constant.feedLine_set_file, encoding='utf-8')
|
||||
for i in range(int(line_count)):
|
||||
line_str = f'FeedLine{i+1}'
|
||||
line_str = f'FeedLine{i + 1}'
|
||||
safe_position = Real_Position()
|
||||
photo_position = Real_Position()
|
||||
mid_position = Real_Position()
|
||||
broken_position = Real_Position()
|
||||
feed_position = Real_Position()
|
||||
|
||||
safe_position.X = float(self.configReader.get(line_str, 'SafePosition_x', fallback=0))
|
||||
safe_position.X = float(self.configReader.get(line_str, 'SafePosition_x', fallback=0))
|
||||
safe_position.Y = float(self.configReader.get(line_str, 'SafePosition_y', fallback=0))
|
||||
safe_position.Z = float(self.configReader.get(line_str, 'SafePosition_z', fallback=0))
|
||||
safe_position.U = float(self.configReader.get(line_str, 'SafePosition_u', fallback=0))
|
||||
@ -237,6 +233,19 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
photo_position.V = float(self.configReader.get(line_str, 'PhotoPosition_v', fallback=0))
|
||||
photo_position.W = float(self.configReader.get(line_str, 'PhotoPosition_w', fallback=0))
|
||||
|
||||
mid_position.X = float(self.configReader.get(line_str, 'MidPosition_x', fallback=0))
|
||||
mid_position.Y = float(self.configReader.get(line_str, 'MidPosition_y', fallback=0))
|
||||
mid_position.Z = float(self.configReader.get(line_str, 'MidPosition_z', fallback=0))
|
||||
mid_position.U = float(self.configReader.get(line_str, 'MidPosition_u', fallback=0))
|
||||
mid_position.V = float(self.configReader.get(line_str, 'MidPosition_v', fallback=0))
|
||||
mid_position.W = float(self.configReader.get(line_str, 'MidPosition_w', fallback=0))
|
||||
|
||||
broken_position.X = float(self.configReader.get(line_str, 'BrokenPosition_x', fallback=0))
|
||||
broken_position.Y = float(self.configReader.get(line_str, 'BrokenPosition_y', fallback=0))
|
||||
broken_position.Z = float(self.configReader.get(line_str, 'BrokenPosition_z', fallback=0))
|
||||
broken_position.U = float(self.configReader.get(line_str, 'BrokenPosition_u', fallback=0))
|
||||
broken_position.V = float(self.configReader.get(line_str, 'BrokenPosition_v', fallback=0))
|
||||
broken_position.W = float(self.configReader.get(line_str, 'BrokenPosition_w', fallback=0))
|
||||
|
||||
feed_position.X = float(self.configReader.get(line_str, 'FeedPosition_x', fallback=0))
|
||||
feed_position.Y = float(self.configReader.get(line_str, 'FeedPosition_y', fallback=0))
|
||||
@ -246,7 +255,9 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
feed_position.W = float(self.configReader.get(line_str, 'FeedPosition_w', fallback=0))
|
||||
|
||||
name = self.configReader.get(line_str, 'Name', fallback='未命名')
|
||||
self.feedLine_dict[f'{Constant.feedLine_set_section}{i+1}'] = FeedLine(name ,safe_position, photo_position, feed_position)
|
||||
self.feedLine_dict[f'{Constant.feedLine_set_section}{i + 1}'] = FeedLine(name, safe_position,
|
||||
photo_position, mid_position,
|
||||
broken_position, feed_position)
|
||||
self.init_seting_frame()
|
||||
self.updateUI_Select_Line()
|
||||
pass
|
||||
@ -298,7 +309,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
|
||||
def send_startFeed_button_click(self):
|
||||
num = self.horizontalSlider_feedingNum.maximum()
|
||||
line_index = str(self.comboBox_lineIndex.currentIndex()+1)
|
||||
line_index = str(self.comboBox_lineIndex.currentIndex() + 1)
|
||||
line_head = self.comboBox_lineIndex.currentData()
|
||||
self.command_quene.put(FeedCommand(FeedingConfig(num, self.feedLine_dict[line_head])))
|
||||
self.stackedWidget_num.setCurrentIndex(1)
|
||||
@ -340,8 +351,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
pass
|
||||
elif 'j6' in btn_str:
|
||||
x6 = x6 - Constant.manual_adjust_accuracy
|
||||
self.send_position_command(x1,x2,x3,x4,x5,x6,MoveType.AXIS)
|
||||
|
||||
self.send_position_command(x1, x2, x3, x4, x5, x6, MoveType.AXIS)
|
||||
|
||||
def send_addOneAsix_button_click(self, btn):
|
||||
btn_str = self.sender().objectName()
|
||||
@ -370,12 +380,11 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
x6 = x6 + Constant.manual_adjust_accuracy
|
||||
self.send_position_command(x1, x2, x3, x4, x5, x6, move_type=MoveType.AXIS)
|
||||
|
||||
|
||||
def send_addNum_button_click(self):
|
||||
self.feeding.feedConfig.num +=1
|
||||
self.feeding.feedConfig.num += 1
|
||||
|
||||
def send_subNum_button_click(self):
|
||||
self.feeding.feedConfig.num -=1
|
||||
self.feeding.feedConfig.num -= 1
|
||||
|
||||
def send_custom_num_returnPressed(self):
|
||||
self.pushButton_num_free.show()
|
||||
@ -384,14 +393,12 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.horizontalSlider_feedingNum.setValue(0)
|
||||
self.label_maxNum.setText(self.lineEdit_num.text())
|
||||
|
||||
def send_stack_feedSet_button_click(self,index):
|
||||
#self.logger.info("This is an info message")
|
||||
def send_stack_feedSet_button_click(self, index):
|
||||
# self.logger.info("This is an info message")
|
||||
self.stackedWidget_feed.setCurrentIndex(index)
|
||||
if index == 0:
|
||||
self.updateUI_Select_Line()
|
||||
|
||||
|
||||
|
||||
def on_button_click(self):
|
||||
self.button.setText("Clicked!")
|
||||
|
||||
@ -402,6 +409,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
# request_command = vars(cmd_command)
|
||||
# self.robotClient.add_sendQuene(request_command)
|
||||
return
|
||||
|
||||
def send_position_returnPressed(self):
|
||||
|
||||
self.send_position_command(float(self.lineEdit_j1.text()),
|
||||
@ -415,6 +423,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.pushButton_speed.hide()
|
||||
self.lineEdit_speed.show()
|
||||
pass
|
||||
|
||||
def send_setSpeed_lineEdit_returePressed(self):
|
||||
Constant.speed = float(self.lineEdit_speed.text())
|
||||
self.lineEdit_speed.hide()
|
||||
@ -422,29 +431,32 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.pushButton_speed.show()
|
||||
pass
|
||||
|
||||
|
||||
def send_get_safe_position_button_click(self):
|
||||
real_position = self.robotClient.status_model.getRealPosition()
|
||||
row_i = self.tableWidget_feedSeting.currentRow()
|
||||
head = self.tableWidget_feedSeting.item(row_i, 0).text()
|
||||
self.feedLine_dict[head].safe_position.init_position(real_position.X,real_position.Y,real_position.Z,real_position.U,real_position.V,real_position.W)
|
||||
self.set_position_to_tabel(row_i,0,real_position)
|
||||
self.feedLine_dict[head].safe_position.init_position(real_position.X, real_position.Y, real_position.Z,
|
||||
real_position.U, real_position.V, real_position.W)
|
||||
self.set_position_to_tabel(row_i, 0, real_position)
|
||||
|
||||
def send_get_photo_position_button_click(self):
|
||||
real_position = self.robotClient.status_model.getRealPosition()
|
||||
row_i = self.tableWidget_feedSeting.currentRow()
|
||||
head = self.tableWidget_feedSeting.item(row_i, 0).text()
|
||||
self.feedLine_dict[head].photo_position.init_position(real_position.X, real_position.Y, real_position.Z, real_position.U, real_position.V, real_position.W)
|
||||
self.feedLine_dict[head].photo_position.init_position(real_position.X, real_position.Y, real_position.Z,
|
||||
real_position.U, real_position.V, real_position.W)
|
||||
self.set_position_to_tabel(row_i, 1, real_position)
|
||||
|
||||
def send_get_feed_position_button_click(self):
|
||||
real_position = self.robotClient.status_model.getRealPosition()
|
||||
row_i = self.tableWidget_feedSeting.currentRow()
|
||||
head = self.tableWidget_feedSeting.item(row_i, 0).text()
|
||||
self.feedLine_dict[head].feed_position.init_position(real_position.X, real_position.Y, real_position.Z, real_position.U, real_position.V, real_position.W)
|
||||
self.feedLine_dict[head].feed_position.init_position(real_position.X, real_position.Y, real_position.Z,
|
||||
real_position.U, real_position.V, real_position.W)
|
||||
self.set_position_to_tabel(row_i, 2, real_position)
|
||||
|
||||
def send_tabelFeedSet_addRow(self):
|
||||
for i in range(1,20):
|
||||
for i in range(1, 20):
|
||||
head = f'{Constant.feedLine_set_section}{i}'
|
||||
if head not in self.feedLine_dict:
|
||||
row_position = self.tableWidget_feedSeting.rowCount() # 当前行数
|
||||
@ -488,9 +500,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.send_clear_auto_command()
|
||||
#
|
||||
|
||||
|
||||
def send_pauseFeed_button_click(self):
|
||||
if self.pushButton_pauseFeed.text()=='暂停':
|
||||
if self.pushButton_pauseFeed.text() == '暂停':
|
||||
self.pushButton_pauseFeed.setText('继续')
|
||||
self.send_pause_command(True)
|
||||
else:
|
||||
@ -498,6 +509,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.send_pause_command(False)
|
||||
|
||||
pass
|
||||
|
||||
def send_tabelFeedSet_itemChanged(self, item):
|
||||
row = item.row()
|
||||
column = item.column()
|
||||
@ -505,48 +517,45 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
head = self.tableWidget_feedSeting.item(row, 0).text()
|
||||
if column == 1:
|
||||
self.feedLine_dict[head].name = value
|
||||
elif column==(0+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (0 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].safe_position.X = float(value)
|
||||
elif column == (1+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (1 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].safe_position.Y = float(value)
|
||||
elif column == (2+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (2 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].safe_position.Z = float(value)
|
||||
elif column == (3+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (3 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].safe_position.U = float(value)
|
||||
elif column == (4+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (4 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].safe_position.V = float(value)
|
||||
elif column == (5+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (5 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].safe_position.W = float(value)
|
||||
# elif column == 7:
|
||||
elif column==(6+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (6 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].photo_position.X = float(value)
|
||||
elif column == (7+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (7 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].photo_position.Y = float(value)
|
||||
elif column == (8+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (8 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].photo_position.Z = float(value)
|
||||
elif column == (9+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (9 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].photo_position.U = float(value)
|
||||
elif column == (10+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (10 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].photo_position.V = float(value)
|
||||
elif column == (11+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (11 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].photo_position.W = float(value)
|
||||
|
||||
elif column==(12+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (12 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].feed_position.X = float(value)
|
||||
elif column == (13+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (13 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].feed_position.Y = float(value)
|
||||
elif column == (14+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (14 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].feed_position.Z = float(value)
|
||||
elif column == (15+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (15 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].feed_position.U = float(value)
|
||||
elif column == (16+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (16 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].feed_position.V = float(value)
|
||||
elif column == (17+self.tableWidget_feedSeting_addtional_col_num):
|
||||
elif column == (17 + self.tableWidget_feedSeting_addtional_col_num):
|
||||
self.feedLine_dict[head].feed_position.W = float(value)
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
while True:
|
||||
time.sleep(0.2)
|
||||
@ -564,7 +573,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
print(Error_Code.SYS_NONEPoint)
|
||||
self.updateUI()
|
||||
|
||||
#pass #主线程
|
||||
# pass #主线程
|
||||
|
||||
def updateUI(self):
|
||||
if self.robotClient.connected:
|
||||
@ -572,7 +581,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
else:
|
||||
self.set_label_status_style(False)
|
||||
if self.feeding.feedStatus != FeedStatus.FNone:
|
||||
self.horizontalSlider_feedingNum.setValue(self.horizontalSlider_feedingNum.maximum()-self.feeding.feedConfig.num)
|
||||
self.horizontalSlider_feedingNum.setValue(
|
||||
self.horizontalSlider_feedingNum.maximum() - self.feeding.feedConfig.num)
|
||||
else:
|
||||
self.set_run_status_button(False)
|
||||
if self.feeding.feedStatus == FeedStatus.FNone:
|
||||
@ -586,8 +596,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
|
||||
def updateUI_Select_Line(self):
|
||||
self.comboBox_lineIndex.clear()
|
||||
for key,value in self.feedLine_dict.items():
|
||||
self.comboBox_lineIndex.addItem(value.name,key)
|
||||
for key, value in self.feedLine_dict.items():
|
||||
self.comboBox_lineIndex.addItem(value.name, key)
|
||||
|
||||
def updateUI_Position(self):
|
||||
self.horizontalSlider_J1.setValue(self.status_address.axis_0)
|
||||
@ -604,13 +614,19 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.label_j5.setText(str(self.status_address.axis_4))
|
||||
self.label_j6.setText(str(self.status_address.axis_5))
|
||||
|
||||
def set_position_to_tabel(self,row_i,position_j,real_Position:Real_Position):
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j*6+self.tableWidget_feedSeting_addtional_col_num, QTableWidgetItem(str(real_Position.X)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j*6+1+self.tableWidget_feedSeting_addtional_col_num, QTableWidgetItem(str(real_Position.Y)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j*6+2+self.tableWidget_feedSeting_addtional_col_num, QTableWidgetItem(str(real_Position.Z)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j*6+3+self.tableWidget_feedSeting_addtional_col_num, QTableWidgetItem(str(real_Position.U)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j*6+4+self.tableWidget_feedSeting_addtional_col_num, QTableWidgetItem(str(real_Position.V)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j*6+5+self.tableWidget_feedSeting_addtional_col_num, QTableWidgetItem(str(real_Position.W)))
|
||||
def set_position_to_tabel(self, row_i, position_j, real_Position: Real_Position):
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j * 6 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
QTableWidgetItem(str(real_Position.X)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j * 6 + 1 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
QTableWidgetItem(str(real_Position.Y)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j * 6 + 2 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
QTableWidgetItem(str(real_Position.Z)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j * 6 + 3 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
QTableWidgetItem(str(real_Position.U)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j * 6 + 4 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
QTableWidgetItem(str(real_Position.V)))
|
||||
self.tableWidget_feedSeting.setItem(row_i, position_j * 6 + 5 + self.tableWidget_feedSeting_addtional_col_num,
|
||||
QTableWidgetItem(str(real_Position.W)))
|
||||
|
||||
def set_label_status_style(self, connected: bool):
|
||||
if connected:
|
||||
@ -634,7 +650,8 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
qproperty-alignment: 'AlignCenter'; /* 设置文本居中 */
|
||||
}
|
||||
""")
|
||||
def set_run_status_button(self, isRuning:bool):
|
||||
|
||||
def set_run_status_button(self, isRuning: bool):
|
||||
self.pushButton_pauseFeed.setText("暂停")
|
||||
if isRuning:
|
||||
self.pushButton_pauseFeed.show()
|
||||
@ -644,13 +661,15 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.pushButton_pauseFeed.hide()
|
||||
self.pushButton_stopFeed.hide()
|
||||
self.pushButton_startFeed.show()
|
||||
|
||||
def send_clear_auto_command(self):
|
||||
clear_command = CMDInstructRequest()
|
||||
request_command = clear_command.toString()
|
||||
print(request_command)
|
||||
log_str = f'清除自动指令'
|
||||
self.command_quene.put(request_command)
|
||||
def send_position_command(self,x1,x2,x3,x4,x5,x6,move_type:MoveType=MoveType.WORLD):
|
||||
|
||||
def send_position_command(self, x1, x2, x3, x4, x5, x6, move_type: MoveType = MoveType.WORLD):
|
||||
position_instruction = Instruction()
|
||||
position_instruction.m0 = float(x1)
|
||||
position_instruction.m1 = float(x2)
|
||||
@ -662,17 +681,17 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
instruction_command = CMDInstructRequest()
|
||||
instruction_command.instructions.append(position_instruction)
|
||||
request_command = instruction_command.toString()
|
||||
log_str = f'移动到位置:{"自由路径" if move_type==MoveType.AXIS else "姿势直线"}:' \
|
||||
log_str = f'移动到位置:{"自由路径" if move_type == MoveType.AXIS else "姿势直线"}:' \
|
||||
f'm0:{position_instruction.m0}-' \
|
||||
f'm2:{position_instruction.m1}-' \
|
||||
f'm3:{position_instruction.m2}-' \
|
||||
f'm4:{position_instruction.m3}-' \
|
||||
f'm3:{position_instruction.m2}-' \
|
||||
f'm4:{position_instruction.m3}-' \
|
||||
f'm5:{position_instruction.m4}-' \
|
||||
f'm6:{position_instruction.m5}'
|
||||
self.logger_textEdit.info(log_str)
|
||||
self.robotClient.add_sendQuene(request_command)
|
||||
|
||||
def send_pause_command(self,pause:bool):
|
||||
def send_pause_command(self, pause: bool):
|
||||
pause_command = CMDRequest()
|
||||
pause_command.cmdData.append("actionPause")
|
||||
if pause:
|
||||
@ -684,7 +703,7 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
log_str = f'暂停:{pause}'
|
||||
self.robotClient.add_sendQuene(request_command)
|
||||
|
||||
def send_clear_alarm_command(self,pause:bool):
|
||||
def send_clear_alarm_command(self, pause: bool):
|
||||
pause_command = CMDRequest()
|
||||
pause_command.cmdData.append("clearAlarmContinue")
|
||||
pause_command.cmdData.append("1")
|
||||
@ -712,7 +731,6 @@ class MainWindow(QMainWindow,Ui_MainWindow):
|
||||
self.robotClient.add_sendQuene(request_command)
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
window = MainWindow()
|
||||
|
||||
Reference in New Issue
Block a user