Example #1
0
        //public bool m_bPreDone;

        public void SetConfig(xi _iXadd, string _sTitle, Control _wcParent)
        {
            string sInputName;

            sInputName = _sTitle;
            if (sInputName == "")
            {
                return;
            }
            //sInputName = sInputName.Substring(5, sInputName.Length - 5);

            m_iXadd       = _iXadd;
            lbAdd.Text    = "NO : " + ((int)m_iXadd).ToString();
            lbHexAdd.Text = string.Format("X{0:X2}", (int)m_iXadd);
            lbTitle.Text  = sInputName;
            this.Parent   = _wcParent;

            //m_bPreDone = false;
            tmUpdate.Enabled = true;
        }
Example #2
0
        //파일로 초기화.
        //_iComNo은 1번부터 입력 되어야 한다.
        public MD_X1000(int _iPortId,
                        xi _xError,
                        xi _xWarning,
                        xi _xReady,
                        xi _xWorking,
                        xi _xWorkEnd,
                        xi _xCheckOk,
                        xi _xCheckNg,
                        yi _yTrigger,
                        yi _yCheck)
        {
            iPortId = _iPortId;

            xError   = _xError;
            xWarning = _xWarning;
            xReady   = _xReady;
            xWorking = _xWorking;
            xWorkEnd = _xWorkEnd;
            xCheckOk = _xCheckOk;
            xCheckNg = _xCheckNg;

            yTrigger = _yTrigger;
            yCheck   = _yCheck;

            sEndOfText = "\r\n";

            Port.DataReceived += new SerialDataReceivedEventHandler(DataReceived);
            Port.Encoding      = System.Text.Encoding.GetEncoding("iso-8859-1");//이것이 8비트 문자 모두 가능 Ascii는 7비트라 63이상의 값은 표현 안됌.

            Port.PortName     = "Com" + iPortId.ToString();
            Port.BaudRate     = 38400;
            Port.DataBits     = 8;
            Port.Parity       = Parity.None;
            Port.StopBits     = StopBits.One;
            Port.ReadTimeout  = 1000;
            Port.WriteTimeout = 1000;

            PortOpen();
        }
Example #3
0
File: ML.cs Project: zoro-008/Works
 //여기는 함수 인자 형변환 안하고 할 수 있게 래핑.
 static public bool         IO_GetX(xi _eX, bool _bDirect = false)
 {
     return(SM.IO.GetX((int)_eX, _bDirect));
 }
Example #4
0
File: ML.cs Project: zoro-008/Works
 static public string       IO_GetXName(xi _eX)
 {
     return(SM.IO.GetXName((int)_eX));
 }
Example #5
0
File: ML.cs Project: zoro-008/Works
 static public bool         IO_GetXUp(xi _eX)
 {
     return(SM.IO.GetXUp((int)_eX));
 }
Example #6
0
File: ML.cs Project: zoro-008/Works
 static public bool         IO_GetXDn(xi _eX)
 {
     return(SM.DIO.GetXDn((int)_eX));
 }