Hi,
also was du als erstes machen musst ist einen Workspace in ACE anlegen der die Informationen enthält welche IP-Adresse der Controller hat und welcher Roboter mit dem Controller verbunden ist. Diesen Workspace startest du dann mit dem ACE Server.
Der ACE Server dient als Schnittstelle zum CX Controller. Ist der Server mit dem Workspace geladen übermittelt er die C# Befehle an den Controller.
Du bindest die Adept C# api in dein C# Projekt ein und erzeugst dort ein Controller und Roboter Objekt. Dem Roboterobjekt kannst du jetzt fahrbefehler Übergeben. Befehl habe ich mal rot markiert. Leider kann ich das nicht selber testen habe kein ACE installiert.
IAdeptController adeptController = (IAdeptController) ace["/SmartController 60/SmartController 60"];
ICobra600 robot = (ICobra600) ace["/SmartController 60/R1 Cobra600"];
// If not calibrated, calibrate the robot
try {
if (robot.IsCalibrated == false) {
robot.Power = true;
robot.Calibrate();
}
} catch (Exception ex) {
Trace.WriteLine(ex.Message);
}
// Read various properties of the robot
Trace.WriteLine("Number of joints = " + robot.JointCount);
double[] jointPositions = robot.JointPosition;
for (int i = 0; i < robot.JointCount; i++) {
Trace.WriteLine("Joint " + i + " " + jointPositions[i]);
}
// Transform the current joint position to a world location
try {
Transform3D loc = robot.JointToWorld(jointPositions);
} catch (Exception ex) {
Trace.WriteLine(ex.Message);
}
// Check if the current location is inrange
Transform3D currentPosition = robot.WorldLocationWithTool;
int inRange = robot.InRange(currentPosition);
Trace.WriteLine(currentPosition + " inrange check = " + inRange);
// Get the current robot configuration
IMoveConfiguration moveConfig = robot.GetMoveConfiguration(jointPositions);
// Create a motion object and command the robot to move
CartesianMove cartesianMove = ace.CreateObject(typeof(CartesianMove)) as CartesianMove;
cartesianMove.MoveConfiguration = moveConfig;
cartesianMove.WorldLocation = currentPosition * new Transform3D(10, 10, 0);
try {
// Issue the move and wait until it is done
robot.Move(cartesianMove);
robot.WaitMoveDone();
// Force the robot to issue a DETACH
robot.AutomaticControlActive = false;
} catch (Exception ex) {
Trace.WriteLine(ex.Message);
}
Sollte eigentlich funktionieren aber bei mir ist das schon ne weile her. Sonst nimm doch mal Kontakt mit dem Adept Support auf. Die helfen in der Regel gerne weiter. softline@adept.com
Wobei einige auch hier im Forum sehr aktiv sind.
Gruss
Björn