瀏覽代碼

현장 Update

SK.Kang 6 年之前
父節點
當前提交
b34772e830

+ 58 - 0
Dev/OHV/Assambly/OHVDrive/route_map/ohv_testmap5.json

@@ -0,0 +1,58 @@
+{
+    "name" : "ohv_testmap5",
+    "points" : [
+        { "ID" : 0,  "x" :  30000, "y" : 16100, "barcode" : 1026649},
+        { "ID" : 1,  "x" :  33000, "y" : 16100, "barcode" : 1029649},
+        { "ID" : 2,  "x" :  42795, "y" : 16100, "barcode" : 1039444},
+        { "ID" : 3,  "x" :  55685, "y" : 16100, "barcode" : 1052334},
+        { "ID" : 4,  "x" :  76625, "y" : 16100, "barcode" : 1073274},
+        { "ID" : 5,  "x" :  89481, "y" : 16100, "barcode" : 1086130},
+        { "ID" : 6, "x" :   95669, "y" : 16100, "barcode" : 1092318},
+        { "ID" : 7, "x" :  100760, "y" :     0, "barcode" : 2062606},
+        { "ID" : 8, "x" :  103760, "y" :     0, "barcode" : 2065606},
+        { "ID" : 9, "x" :   40759, "y" :     0, "barcode" : 2122607},
+        { "ID" : 10, "x" :  35000, "y" :     0, "barcode" : 2133120},
+        { "ID" : 11, "x" :  10261, "y" :     0, "barcode" : 2157859},
+        { "ID" : 12, "x" :  10261, "y" : 16100, "barcode" : 1000840},
+        { "ID" : 13, "x" :  13261, "y" : 16100, "barcode" : 1003840},
+        { "ID" : 14, "x" :   8784, "y" : 16100, "barcode" : 1005433},
+        { "ID" : 15, "x" : 143714, "y" : 16100, "barcode" : 1140363},
+        { "ID" : 16, "x" : 155362, "y" : 16100, "barcode" : 1152011},
+        { "ID" : 17, "x" : 161454, "y" : 16100, "barcode" : 1158103},
+        { "ID" : 18, "x" : 161454, "y" :     0, "barcode" : 2001868},
+        { "ID" : 19, "x" : 158454, "y" :     0, "barcode" : 1998868}
+    ],
+
+    "segments" : [
+        { "ID" :  0, "route_type" : "line", "speed" : 1.0, "barcode" : "yes", "start" : { "pointID" : 19, "skew" : 0, "slope" : 18000}, "end" : { "pointID" : 8, "skew" : 0, "slope" : 18000}, "steer" : 1 },
+
+        { "ID" :  1, "route_type" : "line", "speed" : 0.5, "barcode" : "yes", "start" : { "pointID" : 1, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 2, "skew" : 0, "slope" : 0}, "steer" : 0 },
+        { "ID" :  2, "route_type" : "line", "speed" : 0.5, "barcode" : "yes", "start" : { "pointID" : 2, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 3, "skew" : 0, "slope" : 0}, "steer" : 0 },
+        { "ID" :  3, "route_type" : "line", "speed" : 0.5, "barcode" : "yes", "start" : { "pointID" : 3, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 4, "skew" : 0, "slope" : 0}, "steer" : 0 },
+        { "ID" :  4, "route_type" : "line", "speed" : 0.5, "barcode" : "yes", "start" : { "pointID" : 4, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 5, "skew" : 0, "slope" : 0}, "steer" : 0 },
+        { "ID" :  5, "route_type" : "line", "speed" : 0.5, "barcode" : "yes", "start" : { "pointID" : 5, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 6, "skew" : 0, "slope" : 0}, "steer" : 1 },
+
+        { "ID" : 6, "route_type" : "ohcurve", "speed" : 0.3, "barcode" : "no", "start" : { "pointID" : 6, "skew" : 0, "slope" :  0}, "middle" : {"pointID" : 7, "skew" : 0, "slope" : 18000}, "end" : { "pointID" : 8, "skew" : 0, "slope" : 18000 }, "rotate_type" : "cw", "steer" : 0},
+
+        { "ID" :  7, "route_type" : "line", "speed" : 1.2, "barcode" : "yes", "start" : { "pointID" : 8, "skew" : 0, "slope" : 18000}, "end" : { "pointID" : 9, "skew" : 0, "slope" : 18000}, "steer" : 0 },
+        { "ID" :  8, "route_type" : "line", "speed" : 0.5, "barcode" : "yes", "start" : { "pointID" : 9, "skew" : 0, "slope" : 18000}, "end" : { "pointID" : 10, "skew" : 0, "slope" : 18000}, "steer" : 1 },
+
+        { "ID" : 9, "route_type" : "ohcurve", "speed" : 0.3, "barcode" : "no", "start" : { "pointID" : 10, "skew" : 0, "slope" :  18000}, "middle" : { "pointID" : 0, "skew" : 0, "slope" : 0 },"end" : { "pointID" : 1, "skew" : 0, "slope" : 0 }, "rotate_type" : "cw", "steer" : 0},
+
+        { "ID" :  10, "route_type" : "line", "speed" : 1.2, "barcode" : "yes", "start" : { "pointID" : 10, "skew" : 0, "slope" : 18000}, "end" : { "pointID" : 11, "skew" : 0, "slope" : 18000}, "steer" : 1 },
+
+        { "ID" : 11, "route_type" : "ohcurve", "speed" : 0.3, "barcode" : "no", "start" : { "pointID" : 11, "skew" : 0, "slope" :  18000}, "middle" : { "pointID" : 12, "skew" : 0, "slope" : 0 },"end" : { "pointID" : 13, "skew" : 0, "slope" : 0 }, "rotate_type" : "cw", "steer" : 0},
+
+        { "ID" :  12, "route_type" : "line", "speed" : 0.2, "barcode" : "yes", "start" : { "pointID" : 13, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 14, "skew" : 0, "slope" : 0}, "steer" : 0 },
+
+        { "ID" :  13, "route_type" : "line", "speed" : 1.2, "barcode" : "yes", "start" : { "pointID" : 14, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 1, "skew" : 0, "slope" : 0}, "steer" : 1 },
+
+        { "ID" :  14, "route_type" : "line", "speed" : 1.2, "barcode" : "yes", "start" : { "pointID" : 6, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 15, "skew" : 0, "slope" : 0}, "steer" : 0 },
+
+        { "ID" :  15, "route_type" : "line", "speed" : 0.4, "barcode" : "yes", "start" : { "pointID" : 15, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 16, "skew" : 0, "slope" : 0}, "steer" : 0 },
+
+        { "ID" :  16, "route_type" : "line", "speed" : 0.4, "barcode" : "yes", "start" : { "pointID" : 16, "skew" : 0, "slope" : 0}, "end" : { "pointID" : 17, "skew" : 0, "slope" : 0}, "steer" : 1 },
+
+        { "ID" : 17, "route_type" : "ohcurve", "speed" : 0.3, "barcode" : "no", "start" : { "pointID" : 17, "skew" : 0, "slope" :  0}, "middle" : {"pointID" : 18, "skew" : 0, "slope" : 18000}, "end" : { "pointID" : 19, "skew" : 0, "slope" : 18000 }, "rotate_type" : "cw", "steer" : 0}
+    ]
+}

+ 1 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs

@@ -307,6 +307,7 @@ namespace OHV.Module.Interactivity.PopUp
 
         void PublishEvent(DriveControlEventArgs args)
         {
+            args.EventDir = DriveControlEventArgs.eEventDir.ToBack;
             this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish(args);
         }
 

+ 2 - 0
Dev/OHV/OHV.SqliteDAL/OHVDbInitializer.cs

@@ -101,6 +101,7 @@ namespace OHV.SqliteDAL
                 {
                     AxisName = ConstString.AXIS_CARRIER_LOCK_LEFT,
                     Name = ConstString.TEACH_POSITION_LOCK,
+                    Value = 25,
                 },
                 new AxisPositionData
                 {
@@ -111,6 +112,7 @@ namespace OHV.SqliteDAL
                 {
                     AxisName = ConstString.AXIS_CARRIER_LOCK_RIGHT,
                     Name = ConstString.TEACH_POSITION_LOCK,
+                    Value = 25,
                 },
                 new AxisPositionData
                 {

+ 8 - 0
Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs

@@ -580,6 +580,14 @@ namespace OHV.Vehicle.Concept
             //var vsys = containerRegistry.GetContainer().Resolve<IContainerProvider>();
 
             regionManager.RequestNavigate( RegionNames.MainView, "AutoView" );
+
+            var msg = new DriveControlEventArgs
+            {
+                EventDir = DriveControlEventArgs.eEventDir.ToBack,
+                ControlKind = DriveControlEventArgs.eControlKind.Steering,
+            };
+            msg.MoveDir = DriveControlEventArgs.eMoveDir.LEFT;
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( msg );
         }
 
         public void Dispose()

+ 2 - 2
Dev/OHV/OHV.sln

@@ -159,8 +159,8 @@ Global
 		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Remote1|Any CPU.ActiveCfg = Release|Any CPU
-		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Remote1|Any CPU.Build.0 = Release|Any CPU
+		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Remote1|Any CPU.ActiveCfg = Debug|Any CPU
+		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Remote1|Any CPU.Build.0 = Debug|Any CPU
 		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Remote2|Any CPU.ActiveCfg = Debug|Any CPU
 		{B9A8B13B-518B-4AE4-B8B6-C2684DF6608A}.Remote2|Any CPU.Build.0 = Debug|Any CPU
 	EndGlobalSection

+ 2 - 0
Dev/OHV/VehicleControlSystem/ControlLayer/Clamp.cs

@@ -476,6 +476,8 @@ namespace VehicleControlSystem.ControlLayer
             if ( result != EziMOTIONPlusELib.FMM_OK )
                 return 7;
 
+            Thread.Sleep( 1000 );
+
             result = RightOriginReturn();
             if ( result != EziMOTIONPlusELib.FMM_OK )
                 return 8;

+ 1 - 1
Dev/OHV/VehicleControlSystem/ControlLayer/Conveyor.cs

@@ -65,7 +65,7 @@ namespace VehicleControlSystem.ControlLayer
         public bool IsInverterError() => !this.ezIO.IsOn( "IN_CV_ERROR" ); //Normal Close 로 생각 됨.
         public bool IsLifterPositinCheck() => this.ezIO.IsOn( "IN_LIFTER_POSITION_DETECT" );
         public bool IsLifterDuplication() => this.ezIO.IsOn( "IN_LIFTER_DUPLICATION_DETECT" );
-        public bool IsPIOInterLockOn() => this.ezIO.IsOn( "OUT_PIO_INTERLOCK" );
+        public bool IsPIOInterLockOn() => this.ezIO.IsOn( "IN_PIO_INTERLOCK" );
 
         public int ConveyorLoad()
         {

+ 2 - 3
Dev/OHV/VehicleControlSystem/ControlLayer/Motion/GSIDrive.cs

@@ -169,10 +169,9 @@ namespace VehicleControlSystem.ControlLayer.Drive
                     this.GetReqSteeringState();
                     //this.GetServoState();
                 }
-                catch ( Exception )
+                catch ( Exception e)
                 {
-
-                    throw;
+                    logger.E( $"[Drive] - Error : [{e}]" );
                 }
             }
 

+ 3 - 3
Dev/OHV/VehicleControlSystem/ControlLayer/Serial/BatteryTabos/Peak/Peak.cs

@@ -322,9 +322,9 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
                 case eCanRecvCase.NONE:
                     break;
                 case eCanRecvCase.CASE1:
-                    this.manager.ReceivedDataDic[ eDataKind.Voltage ].Value = mb.ReadBeShort();
-                    this.manager.ReceivedDataDic[ eDataKind.Current ].Value = mb.ReadBeShort();
-                    this.manager.ReceivedDataDic[ eDataKind.BatteryState ].Value = mb.ReadBeShort();
+                    this.manager.ReceivedDataDic[ eDataKind.Voltage ].Value = mb.ReadLeShort();
+                    this.manager.ReceivedDataDic[ eDataKind.Current ].Value = mb.ReadLeShort();
+                    this.manager.ReceivedDataDic[ eDataKind.BatteryState ].Value = mb.ReadLeShort();
                     break;
                 case eCanRecvCase.CASE2:
                     this.manager.ReceivedDataDic[ eDataKind.ChargeCompleteTime ].Value = mb.ReadLeShort();

+ 4 - 4
Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs

@@ -1293,8 +1293,8 @@ namespace VehicleControlSystem.ControlLayer
             if ( this.conveyor.IsInverterError() )
                 return 16;
 
-            if ( !this.conveyor.IsLifterPositinCheck() )
-                return 14;
+            //if ( !this.conveyor.IsLifterPositinCheck() )
+            //    return 14;
 
             //Todo: Sensor Setting 이 후 주석 풀기.
             //if ( !this.IsLifterDuplication() )
@@ -1458,8 +1458,8 @@ namespace VehicleControlSystem.ControlLayer
                 return 0;
             }
 
-            if ( !this.conveyor.IsLifterPositinCheck() )
-                return 13;
+            //if ( !this.conveyor.IsLifterPositinCheck() )
+            //    return 13;
 
             PIOClear();
             loggerPIO.I( $"Start Unload PIO - [{targetName}]" );

+ 2 - 0
Dev/OHV/VehicleControlSystem/VCSystem.cs

@@ -178,6 +178,8 @@ namespace VehicleControlSystem
                 case VCSMessageEventArgs.eVCSMessageKind.ReqBatteryState:
                     this.ReqBatteryState();
                     break;
+                case VCSMessageEventArgs.eVCSMessageKind.ReqPIOBatteryChargeStop:
+                    break;
                 default:
                     break;
             }