-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconnectToRobot.m
31 lines (25 loc) · 893 Bytes
/
connectToRobot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
clear all;
close all;
clc;
addpath('circleTest');
addpath('rotateAxis4');
addpath('tactileTest');
addpath('calcTrajectory');
addpath('calcTrajectorySynchron');
addpath('moveConstForce');
disp('doing init java sleep...');
java.lang.Thread.sleep(100);
% 12 milliseconds
cycleTime = 12;
disp('starting wrapper...');
conHandle=robotConnector('192.168.2.2',6008,'UDP',cycleTime,'C:\Users\Matthias.SEESLENET\Documents\GitHub\KMC\bin\Release\KukaMatlabConnector.dll');
%conHandle=robotConnector('192.168.1.11',6008,'TCP',cycleTime,'C:\Users\Matthias.SEESLENET\Documents\GitHub\KMC\bin\Release\KukaMatlabConnector.dll');
disp('starting connection to robot...');
conHandle.connect();
disp('starting gui...');
conHandle.initGUI();
disp('waiting for connection attempt from robot...');
while( conHandle.isConnected() ~= 1 )
pause(0.01);
end
disp('Matlab is now connected to robot... have fun!');