예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            byte          hiAddr = Convert.ToByte(textBox1.Text, 16);
            byte          loAddr = Convert.ToByte(textBox2.Text, 16);
            CmdFileManage ci     = new CmdFileManage();

            addrc             = ci.GetExcute4AxisCmd(hiAddr, loAddr);
            richTextBox1.Text = DataChange.byteToHexStr(addrc);
        }
예제 #2
0
        public void GetExcute4AxisCmdTest()
        {
            CmdFileManage cf = new CmdFileManage();

            byte[] ret = cf.GetExcute4AxisCmd(0x01, 0x00);
            Assert.AreEqual(ret.Count(), 7);
            Assert.AreEqual(ret[6], 0xDF);

            Assert.AreEqual(ret[0], 0xAA);
            Assert.AreEqual(ret[1], 0x06);
            Assert.AreEqual(ret[2], 0x01);
            Assert.AreEqual(ret[3], 0xD9);
        }