Beispiel #1
0
        public bool Read <T>(string addr, int length, ref object data)
        {
            if (ConnectStatus == false)
            {
                return(false);
            }

            JointVelcAccParam MaxJointVelc    = new JointVelcAccParam();
            JointVelcAccParam MaxJointAcc     = new JointVelcAccParam();
            double            MaxLineAcc      = 0.0;
            double            MaxLinVelc      = 0.0;
            double            MaxAngleAcc     = 0.0;
            double            MaxAngleVelc    = 0.0;
            wayPoint_S        CurrentWaypoint = new wayPoint_S();
            int ToolPowerType = 0;
            ToolDynamicsParam ToolDynamicsParam   = new ToolDynamicsParam();
            ToolInEndDesc     ToolKinematicsParam = new ToolInEndDesc();
            int RobotState = 0;
            int WorkMode   = 0;

            rs_get_global_joint_maxvelc(_rshd, ref MaxJointVelc);
            rs_get_global_joint_maxacc(_rshd, ref MaxJointAcc);
            rs_get_global_end_max_line_acc(_rshd, ref MaxLineAcc);
            rs_get_global_end_max_line_velc(_rshd, ref MaxLinVelc);
            rs_get_global_end_max_angle_acc(_rshd, ref MaxAngleAcc);
            rs_get_global_end_max_angle_velc(_rshd, ref MaxAngleVelc);
            rs_get_current_waypoint(_rshd, ref CurrentWaypoint);
            rs_get_tool_power_type(_rshd, ref ToolPowerType);
            rs_get_tool_dynamics_param(_rshd, ref ToolDynamicsParam);
            rs_get_tool_kinematics_param(_rshd, ref ToolKinematicsParam);
            rs_get_robot_state(_rshd, ref RobotState);
            rs_get_work_mode(_rshd, ref WorkMode);

            Dictionary <string, object> dataInfo = new Dictionary <string, object>();

            dataInfo["MaxJointVelc"]        = MaxJointVelc;
            dataInfo["MaxJointAcc"]         = MaxJointAcc;
            dataInfo["MaxLineAcc"]          = MaxLineAcc;
            dataInfo["MaxLinVelc"]          = MaxLinVelc;
            dataInfo["MaxAngleAcc"]         = MaxAngleAcc;
            dataInfo["MaxAngleVelc"]        = MaxAngleVelc;
            dataInfo["CurrentWaypoint"]     = CurrentWaypoint;
            dataInfo["ToolPowerType"]       = ToolPowerType;
            dataInfo["ToolDynamicsParam"]   = ToolDynamicsParam;
            dataInfo["ToolKinematicsParam"] = ToolKinematicsParam;
            dataInfo["RobotState"]          = RobotState;
            dataInfo["WorkMode"]            = WorkMode;

            data = dataInfo;

            ErrorCode = 0;
            Message   = "Success";

            return(true);
        }
Beispiel #2
0
 public static extern int rs_robot_startup(UInt16 rshd, ref ToolDynamicsParam tool, byte colli_class, bool read_pos, bool static_colli_detect, int board_maxacc, ref int state);
Beispiel #3
0
 public static extern int rs_get_tool_dynamics_param(UInt16 rshd, ref ToolDynamicsParam tool);