示例#1
0
        public override int GetMotionIoSts(int cardId, int axisId, ref int sts)
        {
            int _sts, _rSts;

            _sts  = APS168.APS_motion_io_status(axisId);
            _rSts = 0;
            if (XConvert.BitEnable(_sts, XAPS_Define.MIO_ALM))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MIO_ALM);
            }
            if (XConvert.BitEnable(_sts, XAPS_Define.MIO_EMG))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MIO_MEL);
            }
            if (XConvert.BitEnable(_sts, XAPS_Define.MIO_ORG))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MIO_ORG);
            }
            if (XConvert.BitEnable(_sts, XAPS_Define.MIO_PEL))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MIO_PEL);
            }
            if (XConvert.BitEnable(_sts, XAPS_Define.MIO_SVON))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MIO_SVON);
            }
            sts = _rSts;
            return(0);
        }
示例#2
0
 public void Qufa()       //取反
 {
     lock (obj)
     {
         int data = 0;
         GetDo(ref data);
         XConvert.SetBits(ref data, actDoId);
         card.SetDo(channel, actDoId, ref data);
     }
 }
示例#3
0
        public override int GetMotionSts(int cardId, int axisId, ref int sts)
        {
            int _sts, _rSts;

            _sts  = APS168.APS_motion_status(axisId);
            _rSts = 0;
            if (XConvert.BitEnable(_sts, XAPS_Define.MTS_ASTP))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MTS_ASTP);
            }
            if (XConvert.BitEnable(_sts, XAPS_Define.MTS_HMV))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MTS_HMV);
            }
            if (XConvert.BitEnable(_sts, XAPS_Define.MTS_MDN))
            {
                XConvert.SetBits(ref _rSts, XAPS_Define.MTS_MDN);
            }
            sts = _rSts;
            return(0);
        }