示例#1
0
        //Not a real factory yet; maybe adding that later

        /// <summary>
        /// Initializes a six axis robot, a serial port and wires them together.
        /// </summary>
        /// <param name="comPortName">Name of the serial port used for communication with the hardware.</param>
        /// <returns>Preconfigured robot, with robot and serial port ready for use.</returns>
        public static PreconfiguredRobot PreconfigureRobot(string comPortName)
        {
            var robot        = SixAxisMirobot.CreateNew();
            var telegramPort = new SerialConnection(comPortName);

            robot.AttachConnection(telegramPort);
            telegramPort.AttachRobot(robot);

            telegramPort.Connect();

            return(new PreconfiguredRobot(robot, telegramPort));
        }