Ejemplo n.º 1
0
        public void LedLightOff()        //LED消灯
        {
            //*** UNIT OPEN ***
            MC07.UOpen(MC07.MC07_USB_UNIT_0, ref hUnit, ref sResult1);
            //*** UNIT COMMUNICATION MODE ***
            MC07.UWExUnitCommMode(hUnit, MC07.MC07_EX_UNIT_COMM_RATE_5, 1, MC07.MC07_EX_UNIT_COMM_16BIT, ref sResult1);
            //*** UNIT COMMUNICATION CONTROL ***
            MC07.UWExUnitCommControl(hUnit, MC07.MC07_EX_UNIT_COMM_START, ref sResult1);

            Thread.Sleep(20);
            //*** BPORT OPEN ***
            MC07.BPortOpen(MC07.MC07_USB_UNIT_0, MC07.MC07_EXP0_OUT, ref hPort, ref sResult1);

            //*** BPORT WRITE ***
            pData = 0x02;
            MC07.BPortOut(hPort, ref pData, ref sResult1);

            //*** BPORT CLOSE ***
            MC07.BPortClose(hPort, ref sResult1);
        }