Bläddra i källkod

Conveyor PIO 기능 추가.

SK.Kang 6 år sedan
förälder
incheckning
3f5d21176b

+ 83 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/SteeringConfigView.xaml

@@ -0,0 +1,83 @@
+ <UserControl x:Class="OHV.Module.Interactivity.PopUp.SteeringConfigView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:OHV.Module.Interactivity.PopUp"
+             xmlns:prism="http://prismlibrary.com/"
+             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             Width="800"
+             Height="600"
+             Background="#455a64">
+
+    <prism:Dialog.WindowStyle>
+        <Style TargetType="Window">
+            <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
+            <Setter Property="Background" Value="Transparent"/>
+            <Setter Property="AllowsTransparency" Value="True"/>
+            <Setter Property="ResizeMode" Value="NoResize"/>
+            <Setter Property="WindowStyle" Value="None"/>
+            <Setter Property="BorderThickness" Value="1"/>
+            <Setter Property="BorderBrush" Value="{DynamicResource BorderSolidNormal}"/>
+            <Setter Property="Template" Value="{DynamicResource WindowTemplateKey}"/>
+
+            <!--<Style.Triggers>
+                <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
+                    <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
+                </Trigger>
+            </Style.Triggers>-->
+        </Style>
+    </prism:Dialog.WindowStyle>
+
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="130"/>
+        </Grid.ColumnDefinitions>
+
+        <Grid Grid.Column="0" Margin="15" Background="#37474f">
+            <StackPanel>
+                <Border Margin="15" HorizontalAlignment="Left" VerticalAlignment="Bottom"
+                        Height="250"
+                        Width="250">
+                    <!--<Border.Background>
+                        --><!--<ImageBrush ImageSource="HokuyoReader.png"/>--><!--
+                    </Border.Background>-->
+                </Border>
+            </StackPanel>
+        </Grid>
+
+        <Grid Grid.Column="1" Background="#263238">
+            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+            <StackPanel>
+                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
+                        BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding SteeringConnectCommand}" CommandParameter="true">
+                    <StackPanel>
+                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Connect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+
+                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
+                        BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding SteeringDisConnectCommand}" CommandParameter="true">
+                    <StackPanel>
+                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Disonnect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+
+                <Button Margin="5,50" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                    <StackPanel>
+                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+            </StackPanel>
+        </Grid>
+    </Grid>
+</UserControl>

+ 28 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/SteeringConfigView.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace OHV.Module.Interactivity.PopUp
+{
+    /// <summary>
+    /// SteeringConfigView.xaml에 대한 상호 작용 논리
+    /// </summary>
+    public partial class SteeringConfigView : UserControl
+    {
+        public SteeringConfigView( )
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 12 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/SteeringConfigViewModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OHV.Module.Interactivity.PopUp
+{
+    class SteeringConfigViewModel
+    {
+    }
+}

+ 0 - 13
Dev/OHV/OHV.SqliteDAL/DAL/AxisPositionDataDAL.cs

@@ -9,19 +9,6 @@ namespace OHV.SqliteDAL.DAL
 {
     public class AxisPositionDataDAL : GenericDAL<AxisPositionData>
     {
-        public List<AxisPositionData> All
-        {
-            get
-            {
-                List<AxisPositionData> ll = new List<AxisPositionData>();
-                using (var db = new OHVDbContext("OHVDb"))
-                {
-                    ll = db.Set<AxisPositionData>().ToList();
-                }
-                return ll;
-            }
-        }
-
         public List<AxisPositionData> GetKFromName(string axisName)
         {
             List<AxisPositionData> dataList = new List<AxisPositionData>();

+ 2 - 2
Dev/OHV/OHV.Vehicle/Config/AlarmDefind..csv

@@ -10,8 +10,8 @@
 10,Conveyor,Loading Time Over,,,1,0
 11,Conveyor,Not Exist Carrier,,,1,0
 12,Conveyor,Unloading Time Over,,,1,0
-13,,,,,,
-14,,,,,,
+13,Conveyor,Lifter Not Unloading Position,,,1,0
+14,Conveyor,Lifter Not Loading Position,,,,
 15,,,,,,
 16,,,,,,
 17,,,,,,

BIN
Dev/OHV/OHV.Vehicle/Config/IO.xlsx


+ 20 - 5
Dev/OHV/OHV.Vehicle/Config/log4net.xml

@@ -13,6 +13,10 @@
 		<appender-ref ref="HostAppender" />
 	</logger>
 
+	<logger name="PIO" additivity="false">
+		<appender-ref ref="PIOAppender" />
+	</logger>
+
 	<!--
 	ALL    DEBUG   INFO    WARN    ERROR   FATAL   OFF
 	•All
@@ -29,10 +33,10 @@
 			<param name="LevelMin" value="INFO"></param>
 			<param name="LevelMax" value="OFF"></param>
 		</filter>
-		<file value="D:\LOG\OHV\Vehicle.log" />
+		<file value="D:\LOG\OHV\Vehicle\Vehicle.log" />
 		<appendToFile value="true" />
 		<rollingStyle value="Date" />
-		<backupDays value="180" />
+		<backupDays value="30" />
 		<datePattern value="-MMdd'.log'" />
 		<layout type="log4net.Layout.PatternLayout">
 			<conversionPattern value="%d{MM-dd HH:mm:ss.fff} %-2t %p %m%n" />
@@ -40,10 +44,21 @@
 	</appender>
 
 	<appender name="HostAppender" type="GSG.NET.Logging.FileAppender, GSG.NET">
-		<file value="D:\LOG\OHV\Vehicle\Host.log" />
+		<file value="D:\LOG\OHV\Vehicle\Hos\Host.log" />
 		<appendToFile value="true" />
 		<rollingStyle value="Date" />
-		<backupDays value="180" />
+		<backupDays value="20" />
+		<datePattern value="-MMdd'.log'" />
+		<layout type="log4net.Layout.PatternLayout">
+			<conversionPattern value="%d{MM-dd HH:mm:ss.fff} %-2t %p %m%n" />
+		</layout>
+	</appender>
+
+	<appender name="PIOAppender" type="GSG.NET.Logging.FileAppender, GSG.NET">
+		<file value="D:\LOG\OHV\Vehicle\PIO\PIO.log" />
+		<appendToFile value="true" />
+		<rollingStyle value="Date" />
+		<backupDays value="20" />
 		<datePattern value="-MMdd'.log'" />
 		<layout type="log4net.Layout.PatternLayout">
 			<conversionPattern value="%d{MM-dd HH:mm:ss.fff} %-2t %p %m%n" />
@@ -68,7 +83,7 @@
 
 	<appender name="WarnFileAppender" type="GSG.NET.Logging.FileAppender, GSG.NET">
 		<threshold value="WARN"/>
-		<file value="D:\LOG\OHV\Vehicle_WARN.log" />
+		<file value="D:\LOG\OHV\Vehicle\Vehicle_WARN.log" />
 		<appendToFile value="true" />
 		<rollingStyle value="Date" />
 		<backupDays value="180" />

+ 27 - 4
Dev/OHV/VehicleControlSystem/ControlLayer/Conveyor.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using GSG.NET.Logging;
 using GSG.NET.Utils;
 using VehicleControlSystem.ControlLayer.IO;
 
@@ -10,6 +11,7 @@ namespace VehicleControlSystem.ControlLayer
 {
     public class Conveyor
     {
+        static Logger loggerPIO = Logger.GetLogger("PIO");
         IIO iO = null;
 
         public Conveyor(IIO io)
@@ -17,8 +19,11 @@ namespace VehicleControlSystem.ControlLayer
             this.iO = io;
         }
 
-        void OnOffConveyor(bool isOn, bool isCW)
+        int OnOffConveyor(bool isOn, bool isCW)
         {
+            if (IsInverterError())
+                return 16;
+
             if (isCW)
                 this.iO.OutputOn("OUT_CV_CWCCW");
             else
@@ -28,15 +33,27 @@ namespace VehicleControlSystem.ControlLayer
                 this.iO.OutputOn("OUT_CV_RUN");
             else
                 this.iO.OutputOff("OUT_CV_RUN");
+
+            return 0;
         }
 
+        /// <summary>
+        /// 입구 감지 로딩시 감속 사용
+        /// </summary>
+        /// <returns></returns>
         bool IsDetectedLoadStart() => this.iO.IsOn("IN_CV_DETECT_00");
-        bool IsDetectedLoadSlow() => this.iO.IsOn("IN_CV_DETECT_01");
+
+        /// <summary>
+        /// 실물 감지
+        /// </summary>
+        /// <returns></returns>
+        bool IsDetectedCenter() => this.iO.IsOn("IN_CV_DETECT_01"); 
         bool IsDetectedLoadStop() => this.iO.IsOn("IN_CV_DETECT_02");
+        bool IsInverterError() => this.iO.IsOn("IN_CV_ERROR");
 
         int Load_Carrier()
         {
-            if (IsDetectedLoadStart())
+            if (IsDetectedCenter())
                 return 9;
 
             OnOffConveyor(true, true);
@@ -80,14 +97,20 @@ namespace VehicleControlSystem.ControlLayer
             return 0;
         }
 
-        public int PIOAndLoad()
+        public int PIOAndLoad(string targetName)
         {
+            loggerPIO.I($"Start Load PIO - [{targetName}]");
+
+            this.iO.write
+
+
 
             return 0;
         }
 
         public int PIOAndUnload()
         {
+            loggerPIO.I("Start Unload PIO");
             return 0;
         }
 

+ 93 - 11
Dev/OHV/VehicleControlSystem/ControlLayer/IO/EzIO.cs

@@ -1,6 +1,7 @@
 using GSG.NET.Concurrent;
 using GSG.NET.Excel;
 using GSG.NET.Logging;
+using GSG.NET.Quartz;
 using GSG.NET.Utils;
 using System;
 using System.Collections.Generic;
@@ -95,6 +96,8 @@ namespace VehicleControlSystem.ControlLayer.IO
             }
         }
 
+        TsMap<string, SyncObject> ddWaitChgBlock = new TsMap<string, SyncObject>(); 
+
         #region Pull Thread
         public TsQueue<QueueObject> qQ = new TsQueue<QueueObject>(512);
         public Thread pullThread;
@@ -196,6 +199,25 @@ namespace VehicleControlSystem.ControlLayer.IO
             return bit.IsBitOn;
         }
 
+        public bool WaitChangeInputIO(bool exp, int timeout, string tag)
+        {
+            if (exp == IsOn(tag))
+                return true;
+
+            Assert.IsFalse(ddWaitChgBlock.ContainsKey(tag), "WaitChg InputIO already waiting:{0}", tag);
+            try
+            {
+                var so = new SyncObject { };
+                ddWaitChgBlock.Add(tag, so);
+                so.Lock();
+                return so.Await(timeout);
+            }
+            finally
+            {
+                this.ddWaitChgBlock.Remove(tag);
+            }
+        }
+
         public int LoadIOMap(string strFileName)
         {
             var bl = new ExcelMapper(strFileName).Fetch<EzBoard>("BOARD").ToList();
@@ -270,19 +292,64 @@ namespace VehicleControlSystem.ControlLayer.IO
             return result;
         }
 
-        /// <summary>
-        /// Tag 로 검색
-        /// </summary>
-        /// <param name="strIOAddr"> Tag 명</param>
-        /// <returns></returns>
-        //public int OutputOn( string strIOAddr )
-        //{
-        //    var outIO = this._outPutIOList.Where( x => strIOAddr.Equals( x.Tag ) ).FirstOrDefault();
+        #region 일정시간 이후 동작 구현
+        void WriteOutputOn(string outputTag)
+        {
+            int result = 0;
 
-        //    EziMOTIONPlusELib.FAS_SetIOOutput( outIO.BoardNo, bitOnMask[outIO.Index], 0 );
+            var outIO = this._outPutIOList.Where(x => outputTag.Equals(x.Tag)).FirstOrDefault();
+            var boardType = this.BoardList.Where(x => x.BoardID == outIO.BoardNo).FirstOrDefault().BoardType;
 
-        //    return 0;
-        //}
+            uint bitMask = 0;
+            if (boardType == E_EzboardType.Servo)
+            {
+                bitMask = this.servoAmpOutputBitMask[outIO.Index];
+                result = EziMOTIONPlusELib.FAS_SetIOOutput(outIO.BoardNo, bitMask, 0);
+            }
+            else
+            {
+                bitMask = bitOnMask[outIO.Index];
+                result = EziMOTIONPlusELib.FAS_SetOutput(outIO.BoardNo, bitMask, 0);
+            }
+        }
+        void WriteOutputOff(string strIOAddr)
+        {
+            int result = 0;
+
+            var outIO = this._outPutIOList.Where(x => strIOAddr.Equals(x.Tag)).FirstOrDefault();
+            var boardType = this.BoardList.Where(x => x.BoardID == outIO.BoardNo).FirstOrDefault().BoardType;
+
+            uint bitMask = 0;
+            if (boardType == E_EzboardType.Servo)
+            {
+                bitMask = this.servoAmpOutputBitMask[outIO.Index];
+                result = EziMOTIONPlusELib.FAS_SetIOOutput(outIO.BoardNo, 0, bitMask);
+            }
+            else
+            {
+                bitMask = bitOnMask[outIO.Index];
+                result = EziMOTIONPlusELib.FAS_SetOutput(outIO.BoardNo, 0, bitMask);
+            }
+        }
+
+        public void WriteOutputIO(string tag, bool on, int after = 0)
+        {
+            if ( on)
+            {
+                if (after > 0)
+                    TimerUtils.Once(after, WriteOutputOn, tag);
+                else
+                    WriteOutputOn(tag);
+            }
+            else
+            {
+                if (after > 0)
+                    TimerUtils.Once(after, WriteOutputOff, tag);
+                else
+                    WriteOutputOff(tag);
+            }
+        } 
+        #endregion
 
         public int OutputToggle(uint usIOAddr)
         {
@@ -461,6 +528,7 @@ namespace VehicleControlSystem.ControlLayer.IO
                     i.IsChanged = false;
                     var clone = ObjectCopyUtils.DeepClone<BitBlock>(i);
                     this.qQ.Enqueue(new QoChangedIO { Arg0 = clone });
+                    NotifySyncBit(clone);
                 }
             });
 
@@ -505,6 +573,20 @@ namespace VehicleControlSystem.ControlLayer.IO
         }
         #endregion
 
+        /// <summary>
+        /// InputIO 변경 알림
+        /// </summary>
+        /// <param name="block"></param>
+        void NotifySyncBit(BitBlock block)
+        {
+            if (ddWaitChgBlock.ContainsKey(block.Tag))
+            {
+                var so = ddWaitChgBlock[block.Tag];
+                so.Expect = block;
+                so.Notify();
+            }
+        }
+
         bool IsConnetedBoard(int boardNo)
         {
             return EziMOTIONPlusELib.FAS_IsSlaveExist(boardNo) == 1;

+ 24 - 21
Dev/OHV/VehicleControlSystem/ControlLayer/IO/IIO.cs

@@ -11,7 +11,7 @@ namespace VehicleControlSystem.ControlLayer.IO
 
         //int GetIOTable( SIOTABLE* Input, SIOTABLE* Output )=0;
 
-        int LoadIOMap( string strFileName );
+        int LoadIOMap(string strFileName);
 
         //int SetEtherCatAddress( int* iEcOut, int* iEcIn ) = 0;
 
@@ -31,7 +31,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @return  0      : SUCCESS
                     else   : Device \Error 코드 
          */
-        int GetBit( uint usIOAddr, bool pbval );
+        int GetBit(uint usIOAddr, bool pbval);
 
         /**
          * Hilscher Board와의 Communication을 종료하고 Device Driver를 Close한다.
@@ -48,7 +48,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @return  TRUE   : ON
                     FALSE  : ON이 아님
          */
-        bool IsOn( uint usIOAddr );
+        bool IsOn(uint usIOAddr);
 
         /**
           * I/O Device의 Digital Status (Bit) 를 읽어들여 리턴한다.
@@ -57,7 +57,7 @@ namespace VehicleControlSystem.ControlLayer.IO
           * @return  TRUE   : OFF
                      FALSE  : OFF가 아님 
           */
-        bool IsOff( uint usIOAddr );
+        bool IsOff(uint usIOAddr);
 
         /**
          * Output Device에 On Command (Bit = 1) 를 보낸다.
@@ -65,7 +65,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param usIOAddr : IO Address
          * @return 0 = Success, 그외 = Error Number
          */
-        int OutputOn( uint usIOAddr );
+        int OutputOn(uint usIOAddr);
 
         /**
          * Output Device에 Off Command (Bit = 0) 를 보낸다.
@@ -73,7 +73,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param usIOAddr : IO Address
          * @return 0 = Success, 그외 = Error Number
          */
-        int OutputOff( uint usIOAddr );
+        int OutputOff(uint usIOAddr);
 
         /**
          * Output Device의 Digital Status가 Set이면 (Bit = 0), Output Device에 On Command (Bit = 1) 를 보내고,
@@ -82,7 +82,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param usIOAddr : IO Address
          * @return 0 = Success, 그외 = Error Number
          */
-        int OutputToggle( uint usIOAddr );
+        int OutputToggle(uint usIOAddr);
 
         /**
          * 연속된 8개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue pointer에 넘겨준다.
@@ -91,7 +91,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pcValuse : 연속된 8개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue에 저장한다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int GetByte( uint usIOAddr, byte pcValue );
+        int GetByte(uint usIOAddr, byte pcValue);
 
         /**
          * 연속된 8개의 IO Address로 구성된 Output Device들에 On or Off Command를 보낸다.
@@ -100,7 +100,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pcValuse : Output Device에 보낼 Command를 저장하고 있는 변수이다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int PutByte( uint usIOAddr, byte pcValue );
+        int PutByte(uint usIOAddr, byte pcValue);
 
         /**
          * 연속된 16개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue pointer에 넘겨준다.
@@ -109,7 +109,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pwValuse : 연속된 16개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue에 저장한다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int GetWord( uint usIOAddr, short pwValue );
+        int GetWord(uint usIOAddr, short pwValue);
 
         /**
          * 연속된 16개의 IO Address로 구성된 Output Device들에 On or Off Command를 보낸다.
@@ -118,7 +118,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pwValuse : Output Device에 보낼 Command를 저장하고 있는 변수이다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int PutWord( uint usIOAddr, short pwValue );
+        int PutWord(uint usIOAddr, short pwValue);
 
         /**
          * I/O Device의 Digital Status (Bit) 를  읽어드린다.
@@ -128,7 +128,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @return  0      : SUCCESS
                     else   : Device \Error 코드 
          */
-        int GetBit( string strIOAddr, bool pbVal );
+        int GetBit(string strIOAddr, bool pbVal);
 
         /**
          * I/O Device의 Digital Status (Bit) 를 읽어들여 Bit = 1이면, TRUE(1)를 Return하고, Bit = 0이면 FALSE(0)를 Return한다.
@@ -139,7 +139,7 @@ namespace VehicleControlSystem.ControlLayer.IO
                        others  :  IO값 읽어오기 실패
          */
         //int IsOn( string strIOAddr, bool pbVal );
-        bool IsOn( string ioTag, bool isInput = true );
+        bool IsOn(string ioTag, bool isInput = true);
 
 
         /**
@@ -151,7 +151,7 @@ namespace VehicleControlSystem.ControlLayer.IO
                        others  :  IO값 읽어오기 실패
          */
         //int IsOff( string strIOAddr, bool pbVal );
-        bool IsOff( string ioTag, bool isInput = true );
+        bool IsOff(string ioTag, bool isInput = true);
 
 
         /**
@@ -160,7 +160,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param strIOAddr : IO Address String (ex, "1000:START_SW")
          * @return 0 = Success, 그외 = Error Number
          */
-        int OutputOn( string outputTag );
+        int OutputOn(string outputTag);
 
         /**
          * Output Device에 Off Command (Bit = 0) 를 보낸다.
@@ -168,7 +168,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param strIOAddr : IO Address String (ex, "1000:START_SW")
          * @return 0 = Success, 그외 = Error Number
          */
-        int OutputOff( string outputTag );
+        int OutputOff(string outputTag);
 
         /**
          * Output Device의 Digital Status가 Set이면 (Bit = 0), Output Device에 On Command (Bit = 1) 를 보내고,
@@ -177,7 +177,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param strIOAddr : IO Address String (ex, "1000:START_SW")
          * @return 0 = Success, 그외 = Error Number
          */
-        int OutputToggle( string strIOAddr );
+        int OutputToggle(string strIOAddr);
 
         /**
          * 연속된 8개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue pointer에 넘겨준다.
@@ -186,7 +186,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pcValuse : 연속된 8개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue에 저장한다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int GetByte( string strIOAddr, byte pcValue );
+        int GetByte(string strIOAddr, byte pcValue);
 
         /**
          * 연속된 8개의 IO Address로 구성된 Output Device들에 On or Off Command를 보낸다.
@@ -195,7 +195,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pcValuse : Output Device에 보낼 Command를 저장하고 있는 변수이다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int PutByte( string strIOAddr, byte pcValue );
+        int PutByte(string strIOAddr, byte pcValue);
 
         /**
          * 연속된 16개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue pointer에 넘겨준다.
@@ -204,7 +204,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pwValuse : 연속된 16개의 IO Address로 구성된 Input Device 들의 Digital Status를 읽어들여 pcValue에 저장한다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int GetWord( string strIOAddr, short pwValue );
+        int GetWord(string strIOAddr, short pwValue);
 
         /**
          * 연속된 16개의 IO Address로 구성된 Output Device들에 On or Off Command를 보낸다.
@@ -213,7 +213,7 @@ namespace VehicleControlSystem.ControlLayer.IO
          * @param pwValuse : Output Device에 보낼 Command를 저장하고 있는 변수이다.
          * @return 0 = Success, 그외 = Error Number
          */
-        int PutWord( string strIOAddr, short pwValue );
+        int PutWord(string strIOAddr, short pwValue);
 
         /**
          * Incoming Buffer를 Update하고, Outgoing Buffer의 내용을 Physical I/O에 적용하는 IOThread를 Run한다.
@@ -233,5 +233,8 @@ namespace VehicleControlSystem.ControlLayer.IO
 
         bool IsDeviceOpened();
 
+        void WriteOutputIO(string tag, bool on, int after = 0);
+        bool WaitChangeInputIO(bool exp, int timeout, string tag);
+
     }
 }

BIN
Documents/Software/AGV_MCINTERFACE_V2_20180806.xlsx


BIN
Documents/Software/OHV IO MAP_200305-1.xlsx