Hello,
I am doing my training in Reis robotics. The field of robotics is new to me. I have gone through the manual. But I did not understand the concept of conditional branching in Reis.
Pls help me. Thanks in advance
with regards
Hello,
I am doing my training in Reis robotics. The field of robotics is new to me. I have gone through the manual. But I did not understand the concept of conditional branching in Reis.
Pls help me. Thanks in advance
with regards
so you have manual?
Thanks for replying. Yes I have. But I did not understand the concept of conditional branching.
well not sure what it is like in Reis but conditional branching can take different form,
the most common one is
IF experssion THEN
; do branch 1
ELSE
; do branch 2
ENDIF
but this is not the only one...it could also be switch (or SELECT as named at some languages(
SWITCH experssion
Case 1
; do banch 1
Case 2
; Do branch 2
Case 3
; Do branch 3
Case 4
; Do branch 4
;... etc...
Default
...
END SWITCH
so if you post manual (or page/screenshot from it) that is confusing, we may be able to offer assistance.
This is absolute branching function.
Here I want to only increment the Z axis. For example Z=0 then Z=1,2
Here I want to only increment the Z axis. For example Z=0 then Z=1,2
i don't see how is that conditional or branching at all? seem to be only a motion command
I think branching is similar to FOR and WHILE loop in C programming. So i want to make condition Z<=5. So the Z will increment until 5.
with regards
no... FOR and WHILE are loops. they repeat same block of code multiple times.
branch diverts the execution to another block of code (without repetition).
conditional branch uses some check to decide which block to process. those are IF and SWITCH/CASE statements.
unconditional branch also moves instruction pointer to another block but of course without condition. example of that is a GOTO statement.
btw moving in small increments and comparing position with some limit is workable but slow. much better way is to use interrupt to check if limit is reached and stop motion
Actually here I want to make a weld line. Then I will increment Z maybe 1. Then it will weld on the top of ame line. Thats why i was thinking to use loop.
1. IF ELSEIF ELSE
2.SWITCH with label 1 as line 1 and Label 2 as Line 2
3.FOR Loop.
Above this I did not find IF statement and FOR loop.
to program some machine, you need to learn its language, there is no way around it.
i never used REIS but from bits and pieces found online it looks like it instruction names are a bit different but look very straight forward.
if i interpret this correctly:
key Contr1 is used to insert program control instructions into code.
LABEL <name> is a label
BRANCH Label: is equivalent to GOTO Label:
then there is a variety of TEST and TEST_BIT instructions which seem to be substitute for IF and SELECT CASE. so using TEST #VARIABLE you can create own loop and repeat what you are doing or continue with something else
VAR is used to declare variables
TRAFO_6D and TRAFO_POS can be used to manipulate position variables
there is also TOPLAYER instruction used in multi layer welding (to select top layer)
etc.
Thank you so much for your help.
you are welcome...
yet another personal message:
QuoteIs it possible to make a sphere on Reis robotics.
I tried to make a program of incrementing the z axis. But i am confused with putting values for radius. In the bottom part of the sphere can i make radius increasing and upper part to decrease the radius.
let me see if i understand... you want robot to make a sphere... you increment Z in fixed steps and want to do a circle at each Z level. so need a way to to compute circle radius for each Z value?
if so, why not simply apply Pythagorean theorem. it is one of the basic concepts taught around the world and there must be a reason for that.
for top hemisphere with origin at z=0:
r1 = 150 ; mm (an example of sphere radius)
r2 = SQRT( r1*r1-z*z) ;
; for bottom hemisphere with origin at z=r1:
r1 = 150 ; mm (an example of sphere radius)
r2 = SQRT( r1*r1-(r1-z)*(r1-z)) ;
a general case could be (in KRL):
DECL REAL r1,r2,z0,z1,z2,dZ
DECL INT n,steps
DECL FRAME p0,p1,p2
r1=150; mm (sphere radius)
steps = 1000; number of increments 0..r1
dZ = r1/steps
z0 = 225; mm (elevation where center of sphere is)
; set tool, base, speeds, etc.
FOR n=0 to 2*steps
; do the math
z=z0-r1+n*dZ ; working elevation for each circle
z2=r1-n*dZ ; vertical distance between z0 and working elevation
r2=SQRT(r1*r1-z2*z2)
; then do the circle
; a) initialize points for circle
p0=$NULLFRAME
p0.z=z ; and set elevation
p1=p0 ; copy to other points
p2=p0
; b) move to first point
p0.x=z2
LIN p0
; c) do a circle
p1.y=z2
p2.x=-z2
CIRC p1, p2, CA 360
END FOR
Display More
btw. please don't send me personal message for free advice on robot topics. someone else's robots are not something that i have personal interest in. besides, that would be a blatant attempt to circumvent the idea of an open discussion - which is a whole point of having a forum. to get someone interested in your problems is easy and i am open to have private conversations too - if it benefits ME. an example of that is that money is involved (for me), or topic is something i have personal interest in. someone learning to program, or learn about robots or trying to fix something bought second hand does not qualify, hence my signature as shown in each of posts:
Quote1) read pinned topic: READ FIRST...
2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly
3) read 1 and 2
Hello, here i uploaded the program that i wrote. Here i couldnt write as an equation. so i calculated and just added the value. Also i didnt understand about the steps p0= z2 and so on.
with regards
that example was in KRL
p0,p1,p2 etc are FRAME which is a structure with X,Y,Z,A,B,C elements
A,B,C are rotations about axes Z,Y,X (that is order KUKA uses)
p2=p0 copies all elements of p0 to p2 (X,Y,Z,A,B,C)
so to access only Z element of p0, one can use
p0.Z = new_height
this keeps other elements at their previous value.
$NULLFRAME is a frame where all size elements are zeros. you can accomplish same by
p0 = {X 0, Y 0, Z 0, A 0, B 0, C 0}
Hello,
Okay thanks i got it . Is it a program for one hemisphere. It is bit confusing for me because in the above sentence it is mentioned about top hemisphere has Z=0 and bottom has Z=R1. Also in the program it is given, FOR 0 to 2*1000 steps.
In the program,
po.x = Z2
p1.y = Z2
p2.x = -Z2
I understood that These are the Points of the circle. But why it is negative Z2 ?
How it will create a circle if give the value of Z2 for These positions. Z2 means vertical direction ? or should give the value of R2