Greetings
I am a 3rd year mechatroincs and robotics student in leeds, where I am attempting to control some ABB robotic arms using an Xbox Kinect for my Individual Project.
My first port of call was to learn how to use RobotStudio, then learn how to use Visual Studio (for the Kinect) and then finally Link them up using the PC SDK.
I am having trouble self teaching myself RobotStudio, I have learnt how to teach targets and now moved onto RAPID programming. I have been using MoveAbsJ successfully to manipulate individual joints by a predetermined angle.
The trouble I have is when I try to move the joint by a variable angle (or an angle which is updated every iteration of the loop, as I envision this is how the Kinect will work as it feeds data to RbotStudio).
Here are my specific snippets of code:
VAR num X:=6; !testing how variables can be used for varying angle change
VAR num Y;
VAR num Z;
VAR jointtarget rotJ1_X:=[[Y,0,0,0,0,0],[0, 9E9, 9E9, 9E9, 9E9, 9E9]];
PROC
Path_30()! tests looping and variable joint movement
MoveAbsJ calib_pos,v1000\T:=3,z100,MyTool\WObj:=wobj0;
WHILE(X>0)DO
Z:=Pow(-1,X); !set up variable to change direction dependant on iteration
Y:=Z*75; !move desired angle
MoveAbsJ rotJ1_X, v600,z50,MyTool\WObj:=wobj0;
X:=X-1; ! decrement X
ENDWHILE
MoveAbsJ calib_pos,v1000\T:=3,z100,MyTool\WObj:=wobj0;
ENDPROC
The only error I get is “Expression Y is not a constant expression”, Y as you can see from the code alternates between 75 and -75 and it is set as a variable, rotJ1_X is also declared a variable.
It could be a number of things; my naivity at basic RAPID programming, jointtarget can never be a variable. The only things I have to teach myself are the brief online tutorials and the reference manuals.
Could somebody please help me solve this issue?
Secondly if anybody has any experience marrying the Kinect and RobotStudio/ABB arms any insight would be greatly appreciated as I may be going down the wrong route or wasting time.
Kind regards- Mechatronics Student (I cant get rid of the green)