Beispiel #1
0
        public void SetConfig(yi _iYadd, string _sTitle, Control _wcParent)
        {
            string sOutputName;

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

            m_iYadd      = _iYadd;
            lbTitle.Text = sOutputName;
            this.Parent  = _wcParent;

            m_bPreDone = false;
            //tmUpdate.Enabled = true;
        }
Beispiel #2
0
        public void SetConfig(yi _iYadd, string _sTitle, Control _wcParent)
        {
            string sInputName;

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

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

            m_bPreDone       = false;
            tmUpdate.Enabled = true;
        }
Beispiel #3
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();
        }
Beispiel #4
0
 static public string       IO_GetYName(yi _eY)
 {
     return(SM.IO.GetYName((int)_eY));
 }
Beispiel #5
0
 static public bool         IO_GetYUp(yi _eY)
 {
     return(SM.IO.GetYUp((int)_eY));
 }
Beispiel #6
0
 static public bool         IO_GetY(yi _eY, bool _bDirect = false)
 {
     return(SM.IO.GetY((int)_eY, _bDirect));
 }
Beispiel #7
0
 static public void         IO_SetY(yi _eY, bool _bVal, bool _bDirect = false)
 {
     SM.IO.SetY((int)_eY, _bVal, _bDirect);
 }
Beispiel #8
0
 static public bool         IO_GetYDn(yi _eY)
 {
     return(SM.DIO.GetYDn((int)_eY));
 }