예제 #1
0
        private void btnRunStatus_Click(object sender, EventArgs e)
        {
            int count = 0;

            Focas1.IODBTIMER time = new Focas1.IODBTIMER();
            short            ret  = Focas1.cnc_gettimer(cncHandle, time);

            if (ret == Focas1.EW_OK)
            {
                MessageBox.Show(string.Format("µ±Ç°Ê±¼ä:{0}Äê{1}ÔÂ{2}ÈÕ {3}:{4}:{5}", time.date.year, time.date.month, time.date.date, time.time.hour, time.time.minute, time.time.second));
            }
        }
예제 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Fanuc.IODBTIMER iodbtimer = new Focas1.IODBTIMER();
            int             ret       = Fanuc.cnc_gettimer(Fanuc.h, iodbtimer);

            if (ret == Fanuc.EW_OK)
            {
                Fanuc.TIMER_DATE timerdate = iodbtimer.date;
                Fanuc.TIMER_TIME timertime = iodbtimer.time;
            }
            else
            {
                MessageBox.Show(ret + "");
            }
        }