예제 #1
0
        public void setWaveLegnth(byte speed, int freqVal)
        {
            //http://stackoverflow.com/questions/1318933/c-int-to-byte
            byte[] intBytes = BitConverter.GetBytes(freqVal);
            byte   mult     = 64;

            //Array.Reverse(intBytes);
            intBytes[1] = (byte)(intBytes[1] + (byte)(speed * mult));//Add the speed component to the high position byte
            if (lambdaCom.isOpen())
            {
                lambdaCom.writeByte(218 /*byteCom.byteSetWlength*/);
                lambdaCom.writeByte(intBytes[0]);
                lambdaCom.writeByte(intBytes[1]);
            }
            return;
        }
예제 #2
0
 public void setStepAngle(byte filterVal, byte moveByte, int stepIncrementLong)//Need to implement
 {
     //http://stackoverflow.com/questions/1318933/c-int-to-byte
     byte[] result = BitConverter.GetBytes(stepIncrementLong);
     if (com.isOpen())
     {
         com.writeByte(byteCom.byteVFBatch);
         com.writeByte(moveByte);
         com.writeByte(byteCom.byteSetUSteps);
         com.writeByte(result[0]);
         com.writeByte(result[1]);
     }
     return;
 }