SK.Kang 6 年 前
コミット
9532ddc371

BIN
Dev/OHV/Assambly/OHVConnector.dll


BIN
Dev/OHV/Assambly/OHVConnector.pdb


+ 5 - 1
Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs

@@ -1010,7 +1010,8 @@ namespace VehicleControlSystem.ControlLayer
         {
             this.VehicleStateProperty = eVehicleState.Unload;
 
-            if ( !this.CurrentTag.ToString().Equals( sub.TargetID ) )
+            var targetNo = Convert.ToInt32( sub.TargetID );
+            if ( this.CurrentTag != targetNo )
             {
                 this.OccurVehicleAlarm( 21 );
                 return false; //Alarm
@@ -1349,6 +1350,9 @@ namespace VehicleControlSystem.ControlLayer
         public int PIOAndLoad( string targetName )
         {
 #if SIMULATION
+            this.OnFailReport?.Invoke( eFailCode.LoadPIOInterlockTimeout );
+            return 0;
+
             PIOClear();
             loggerPIO.I( $"Start Load PIO - [{targetName}]" );
             this.OnPIOStart?.Invoke( true );

+ 1 - 1
Dev/OHV/VehicleControlSystem/Managers/HostManager.cs

@@ -523,7 +523,7 @@ namespace VehicleControlSystem.Managers
         {
             var msg = new OCSMessage();
             msg.Kind = eKind.B;
-            var bData = volt;
+            var bData = 54.32;
             msg.Tag = bData.ToString( "00.00" ).Replace( ".", "" );
             msg.IsSubCode1 = this.vehicle.IsContain;
             msg.IsSubCode2 = vehicle.IsMoving;

BIN
Dev/OHVDriveLogger/OHVDriveLogger/.vs/OHVDriveLogger/v16/Server/sqlite3/storage.ide


+ 3 - 0
Dev/OHVDriveLogger/OHVDriveLogger/OHVDriveLogger.sln

@@ -9,12 +9,15 @@ Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Release|Any CPU = Release|Any CPU
+		Remote|Any CPU = Remote|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{2C4A899E-68A7-45AB-BB81-65D0D941AF1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{2C4A899E-68A7-45AB-BB81-65D0D941AF1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{2C4A899E-68A7-45AB-BB81-65D0D941AF1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{2C4A899E-68A7-45AB-BB81-65D0D941AF1E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2C4A899E-68A7-45AB-BB81-65D0D941AF1E}.Remote|Any CPU.ActiveCfg = Remote|Any CPU
+		{2C4A899E-68A7-45AB-BB81-65D0D941AF1E}.Remote|Any CPU.Build.0 = Remote|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 13 - 0
Dev/OHVDriveLogger/OHVDriveLogger/OHVDriveLogger/FormMain.Designer.cs

@@ -30,6 +30,7 @@
         {
             this.lblPLCCommState = new System.Windows.Forms.Label();
             this.label55 = new System.Windows.Forms.Label();
+            this.button1 = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // lblPLCCommState
@@ -59,12 +60,23 @@
             this.label55.Text = "PLC COMM";
             this.label55.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(156, 20);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(91, 33);
+            this.button1.TabIndex = 13;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
             // FormMain
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.ActiveBorder;
             this.ClientSize = new System.Drawing.Size(419, 72);
+            this.Controls.Add(this.button1);
             this.Controls.Add(this.lblPLCCommState);
             this.Controls.Add(this.label55);
             this.Name = "FormMain";
@@ -77,6 +89,7 @@
 
         public System.Windows.Forms.Label lblPLCCommState;
         private System.Windows.Forms.Label label55;
+        private System.Windows.Forms.Button button1;
     }
 }
 

+ 9 - 1
Dev/OHVDriveLogger/OHVDriveLogger/OHVDriveLogger/FormMain.cs

@@ -35,7 +35,7 @@ namespace OHVDriveLogger
         {
             this.plc.Config.Id = "KV8000";
             this.plc.Config.IpAddress = "192.168.0.20";
-            this.plc.Config.Port = 8501; //5000
+            this.plc.Config.Port = 5000; //5000
             this.plc.Config.MonitorInterval = 500;
 
             var grpB = new KncGroup { Device = KncDevice.MR, Name = "MR" };
@@ -67,5 +67,13 @@ namespace OHVDriveLogger
         {
             logger.I( $"[Bit Change] - {block.Name} / {block.IsBitOn}" );
         }
+
+        private void button1_Click( object sender, EventArgs e )
+        {
+            if ( plc.ReadBit( "DRIVE_LOGGING_ONOFF" ).IsBitOn )
+                plc.WriteBit( "DRIVE_LOGGING_ONOFF", false );
+            else
+                plc.WriteBit( "DRIVE_LOGGING_ONOFF", true );
+        }
     }
 }

+ 11 - 0
Dev/OHVDriveLogger/OHVDriveLogger/OHVDriveLogger/OHVDriveLogger.csproj

@@ -31,6 +31,17 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>\\192.168.127.10\KV8000\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <LangVersion>7.3</LangVersion>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="FluentFTP">
       <HintPath>..\..\..\OHV\Assambly\FluentFTP.dll</HintPath>

+ 7 - 7
Dev/OHVDriveLogger/OHVDriveLogger/OHVDriveLogger/ZmqManager.cs

@@ -41,14 +41,14 @@ namespace OHVDriveLogger
             logger.I( e.Socket.ReceiveMultipartStrings() );
         }
 
-        string Request(string topic )
-        {
-            this.req.SendFrame( topic );
+        //string Request(string topic )
+        //{
+        //    this.req.SendFrame( topic );
 
-            if ( this.req.Poll( TimeSpan.FromSeconds( 5 ) ) )
-            {
+        //    if ( this.req.Poll( TimeSpan.FromSeconds( 5 ) ) )
+        //    {
 
-            }
-        }
+        //    }
+        //}
     }
 }

BIN
Dev/OHVLoggerTest/.vs/OHVLoggerTest/v16/Server/sqlite3/storage.ide


+ 0 - 1
Dev/OHVLoggerTest/OHVLoggerTest/Form1.cs

@@ -25,7 +25,6 @@ namespace OHVLoggerTest
         Logger logger = Logger.GetLogger();
 
         ThreadCancel threadCancel = new ThreadCancel();
-        KV8000 plc = new KV8000();
 
         List<point> Points = null;
         List<segment> Segments = null;