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); }
public static extern int rs_get_tool_kinematics_param(UInt16 rshd, ref ToolInEndDesc tool);
public static extern int rs_set_tool_end_param(UInt16 rshd, ref ToolInEndDesc tool);
public static extern int rs_base_to_base_additional_tool(UInt16 rshd, ref Pos flange_center_pos_onbase, ref Ori flange_center_ori_onbase, ref ToolInEndDesc tool_pos, ref Pos tool_end_pos_onbase, ref Ori tool_end_ori_onbase);
public static extern int rs_user_to_base(UInt16 rshd, ref Pos pos_onuser, ref Ori ori_onuser, ref CoordCalibrate user_coord, ref ToolInEndDesc tool_pos, ref Pos pos_onbase, ref Ori ori_onbase);
public static extern int rs_move_joint_to(UInt16 rshd, ref Pos target, ref ToolInEndDesc tool, bool isblock);