Doosan Robotics Programming Manual V2.9.3 v2.6 en
Doosan Robotics Programming Manual V2.9.3 v2.6 en
3
Document version : V2.6
Original instructions(en_US)
Programming manual(V2.9.3)
M0609 | M0617 | M1013 | M1509 | H2017 | H2515
A0509 | A0509S | A0912 | A0912S
Table of Contents
1 Preface ......................................................................................15
1.1 Copyright ............................................................................................... 15
8.2.3 tan(x)......................................................................................................................281
8.2.4 asin(x) ....................................................................................................................282
8.2.5 acos(x) ....................................................................................................................283
8.2.6 atan(x)....................................................................................................................283
8.2.7 atan2(y, x)...............................................................................................................284
8.3 Linear algebra .......................................................................................285
8.3.1 norm(x)...................................................................................................................285
8.3.2 rotx(angle) ..............................................................................................................285
8.3.3 roty(angle) ..............................................................................................................286
8.3.4 rotz(angle) ..............................................................................................................287
8.3.5 rotm2eul(rotm) .......................................................................................................288
8.3.6 rotm2rotvec(rotm) ..................................................................................................289
8.3.7 eul2rotm([alpha,beta,gamma]) ................................................................................289
8.3.8 eul2rotvec([alpha,beta,gamma]) ..............................................................................290
8.3.9 rotvec2eul([rx,ry,rz]) ...............................................................................................291
8.3.10 rotvec2rotm([rx,ry,rz]) ............................................................................................292
8.3.11 htrans(posx1,posx2) ................................................................................................293
8.3.12 get_intermediate_pose(posx1,posx2,alpha) ..............................................................294
8.3.13 get_distance(posx1, posx2) ......................................................................................295
8.3.14 get_normal(x1, x2, x3) .............................................................................................296
8.3.15 add_pose(posx1,posx2)............................................................................................297
8.3.16 subtract_pose(posx1,posx2).....................................................................................298
8.3.17 inverse_pose(posx1) ................................................................................................299
8.3.18 dot_pose(posx1, posx2) ...........................................................................................300
8.3.19 cross_pose(posx1, posx2).........................................................................................301
8.3.20 unit_pose(posx1) .....................................................................................................302
- 10 - Programming manual(V2.9.3)
- 11 - Programming manual(V2.9.3)
- 12 - Programming manual(V2.9.3)
- 13 - Programming manual(V2.9.3)
- 14 - Programming manual(V2.9.3)
Preface
1 Preface
This manual is composed of thirteen chapters. Chapter 2 through 12 describe DRL commands common to M-
series robot, H-series robot and A-series robot, chapter 13 describes DRL commands that apply only to A-series
robot.
The contents of this manual are current as of the date this manual was written, and product-related information
may be modified without prior notification to the user.
For more information on the revised manual, please visit our Robot LAB website. (https://
robotlab.doosanrobotics.com/)
1.1 Copyright
The copyright and intellectual property rights of the contents of this manual are held by Doosan Robotics. It is
therefore prohibited to use, copy, or distribute the contents without written approval from Doosan Robotics. In
the event of abuse or modification of the patent right, the user will be fully accountable for the consequences.
While the information in this manual is reliable, Doosan Robotics will not be held accountable for any damage
that occurs due to errors or typos. The contents of this manual may be modified according to product
improvement without prior notification.
- 15 - Programming manual(V2.9.3)
DRL Basic Syntex
Caution
The syntax of DRL is the same as the syntax of Python which means that DRL does not include all the
syntax and features of Python.
DRL only supports the information described in this manual.
2.1.1 Indent
Features
This function is used to separate each code block. An error occurs if the indentation is not complied.
Example
1 Code block 1
2 [TAB] Code block 2
3
4 Example)
5 if x = = 3 :
6 y + = 1
7
8 # No Error
9 def fnSum(x,y):
10 [space4] sum = x + y
11 [space4] return sum
12
13 # No Error
14 def fnSubtract(x,y):
15 [TAB]diff = x - y
16 [TAB] return diff
17
18
19 # Indentation error
20 def fnProduct(x,y):
21 [space4]product = x * y
22 [TAB] return product
- 16 - Programming manual(V2.9.3)
DRL Basic Syntex
2.1.2 Comment
Features
This function is used to provide an additional description of the code. The comments do not affect the source
code since they are excluded from code processing.
A statement following "#" is recognized as a comment. A block that begins with ’’’ and ends with ’’’ is
recognized as a comment.
• Comment is used to provide an additional description of the code. The comments do not affect the source
code since they are excluded from code processing
• A statement following "#" is recognized as a comment.
• A block that begins with ’’’ and ends with ’’’ is recognized as a comment
Example
1 # Comment example 1
2 ’’’
3 Comment example 2
2.2 Variable
Features
• Variable is used to express the data value and can consist of letters, numbers, and underscores (_). The
first character cannot be a number.
• Letters are case sensitive.
• An error occurs if the variable name is the same as a reserved word or interpreter internal function name.
To avoid this, use the function name as using the prefix "var _", if possible.
Caution
Never use the following reserved words as variable names or function names.
- 17 - Programming manual(V2.9.3)
DRL Basic Syntex
if import in is lambda
Example
1 friend = 10
2 Friend = 1
3 _myFriend = None
4
5 Pass = 10 # Syntax error
6 movej = 0 # movej is a DRL instruction name and should not be
used as a variable.
Features
DRL provides numeric types such as int, float, complex number and so on.
Example
- 18 - Programming manual(V2.9.3)
DRL Basic Syntex
2.2.3 String
String
Features
All character strings are in Unicode.
• Escape characters
\n: New line
\t: Tab
\r: Carrage return
\0: Null string
\\: back slash(\) in string
\’: single quote mark in string
\": double quote mark in string
Example
1 "string1"
2 'string2'
3
4 tp_log( "st" + "ring" )
5 #expected result: string
6 tp_log( "str" * 3 )
7 #expected result: strstrstr
8 tp_log( "line1\nline2" )
9 #expected result: line1
10 # line2
11 tp_log( "\"string\"" )
12 #expected result: "string"
13 tp_log( "str" [ 0 ])
14 #expected result: s
15 tp_log( "string" [ 1 : 3 ])
16 #expected result: tr
- 19 - Programming manual(V2.9.3)
DRL Basic Syntex
+, *
Example
Example
2.2.4 list
Features
• The items in a list can be changed and ordered.
• A list can be indexed and sliced.
• append, insert, extend, and + operators
• count, remove, and sort operators
Example
2.2.5 tuple
Features
Tupule is similar to a list but is faster at processing since it is read-only.
- 20 - Programming manual(V2.9.3)
DRL Basic Syntex
Example
2.2.6 dictionary
Features
Dictionary specifies the keys and values and lists the values.
Example
1 d = dict (a = 1 , b = 3 , c = 5 )
2
3 colors = dict ()
4 colors[ "cherry" ] = "red"
5
6 ages = { 'Kim' : 35 , 'Lee' : 38 , 'Chang' : 37 }
7 tp_log( "Ages of Kim = " + str (ages[ 'Kim' ]))
8 #expected print result: Ages of Kim = 35
2.3 Function
Features
• Declaration: A function begins with def and ends with colon (:).
• The beginning and ending of a function is specified by an indentation of the code.
• The interface and implementation are not separated. However, they must have been defined before they
are used.
• An error occurs if the function name is the same as a reserved word or interpreter internal function name.
- 21 - Programming manual(V2.9.3)
DRL Basic Syntex
To avoid this, use the function name as using the prefix "fn_", if possible.
Caution
Never use the following reserved words as variable names or function names.
if import in is lambda
sentence
def <function name> (parameter 1, parameter 2, … parameter N):
<syntax> …
Example
1 # Example
2 def fn_Times(a, b):
3 return a * b
4
5 fn_Times ( 10 , 10 )
6
7 def fn_Times(a, b):
8 return a * b
9
10 tp_log( str (fn_Times( 10 , 5 )))
11 #expected result: 50
12
13 def movej():
14 return 0 # movej should not be used as a function name
as interpreter
15 # internal function name
- 22 - Programming manual(V2.9.3)
DRL Basic Syntex
Features
• If there is no value corresponding to the local variable name in a function, the name can be found based on
the LGB rule.
• Namespace: An area that contains the variable name
• Local scope: A namespace and local domain inside a function
• Global scope: Global domain outside a function
• Built-in scope: The domain related to the contents defined by Python and an internal domain
• LGB rule: The order of finding a variable name. local → global → built-in
Example
Features
DRL provides 3 types of parameter modes: Default parameter values, Keyword parameters and Arbitary
parameters
Example
1 def fn_Times(a = 10 , b = 20 ):
2 return a * b
3
4 #Example - Default parameter value
5 tp_log( str (fn_Times( 5 )))
6 #expected result: 100
7
- 23 - Programming manual(V2.9.3)
DRL Basic Syntex
1 def fn_Times(a = 10 , b = 20 )
2 return a * b
3
4 fn_Times( 5 )
1 def fn_Times(a = 10 , b = 20 )
2 return a * b
3
4 fn_Times(a = 5 , b = 5 )
2.4.1 pass
Features
The ‘pass’ is used when an operation is not executed.
- 24 - Programming manual(V2.9.3)
DRL Basic Syntex
Example
1 while True :
2 pass #pass means empty statement, so while statement
continues to run.
3 tp_log( "This line never reached" )
2.4.2 if
Features
‘if’ is a conditional statement. It can use "elif" and "else" according to whether the condition of the "if" syntax is
true or false.
sentense
if <conditional statement>:
<syntax>
else:
1 numbers = [ 2 , 5 , 7 ]
2 for number in numbers:
3 if number % 2 = = 0 :
4 tp_log( str (number) + " is even" )
5 else :
6 tp_log ( str (number) + " is odd" )
7 #expected result:
8 #2 is even
9 #5 is odd
10 #7 is odd
- 25 - Programming manual(V2.9.3)
DRL Basic Syntex
2.4.3 while
Features
‘while’ is a conditional statement that repeats an operation according to whether the condition is true or false.
syntax
while <conditional statement>:
<syntax>
Example
1 sum = 0
2 cnt = 1
3 while cnt < 10 :
4 sum = sum + cnt
5 cnt = cnt + 1
6 tp_log( "sum = " + str ( sum ))
7 #expected result:
8 #sum = 45
2.4.4 for
Features
'for' repeats an operation within the specified repeating range.
syntax
for <item> in <sequential object S>:
<syntax>
Example
1 x = 0
2 for i in range ( 0 , 3 ): # i is 0 -> 1 -> 2
3 x = x + 1
4
5 sum = 0
6 for i in range ( 0 , 10 ):
7 sum = sum + i
8 tp_log( "sum = " + str ( sum ))
- 26 - Programming manual(V2.9.3)
DRL Basic Syntex
9 #expected result:
10 #sum = 45
2.4.5 break
Features
'break' is used to exit the internal block of a loop.
Example
1 x = 0
2 while True :
3 x = x + 1
4 if x > 10 :
5 break
6
7 sum = 0 ;cnt = 0
8 while True :
9 if cnt > 9 :
10 break
11 sum = sum + cnt
12 cnt = cnt + 1
13 tp_log( "sum = " + str ( sum ))
14 #expected print result:
15 #sum = 45
2.4.6 continue
Features
If 'continue' is used in a loop block, the loop stops further executing and returns to the beginning point of the
loop.
Example
1 #<ex> 1
2 x = 0
3 y = 0
4 while True :
5 x = x + 1
6 if x > 10 :
7 continue
8 y + = 100
9
- 27 - Programming manual(V2.9.3)
DRL Basic Syntex
10 #<ex> 2
11 sum = 0
12 for i in range ( 0 , 10 ):
13 if i % 2 = = 0 :
14 continue
15 sum = sum + i
16 tp_log( "sum of odd numbers = " + str ( sum ))
17 #sum of odd numbers = 25
Features
The "else" block is executed when the loop is executed until the end without being terminated by the "break"
function in the middle of executing a loop.
Example
1 L = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }
2
3 for i in L:
4 if i % 2 = = 0 :
5 continue
6 else :
7 tp_log( "exit without break" )
- 28 - Programming manual(V2.9.3)
Motion-related Commands
3 Motion-related Commands
Features
This function designates the joint space angle in coordinate values.
Parameters
No. Data Type Default Description
Value
Return
Posj
Exception
Exception Description
- 29 - Programming manual(V2.9.3)
Motion-related Commands
Example
1 q1 = posj() # q1=posj(0,0,0,0,0,0)
2
3 q2 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
4
5 q3 = posj([ 0 , 30 , 60 , 0 , 90 , 0 ]) #
q3=posj(0,30,60,0,90,0)
Related commands
• movej()(p. 54)
• amovej()(p. 95)
• movesj()(p. 74)
• amovesj()(p. 108)
Features
This function designates the joint space angle in coordinate values.
Parameters
No. Data Type Default Description
Value
X float 0 X position or
list position list or
posx posx
Y float 0 Y position
Z float 0 Z position
- 30 - Programming manual(V2.9.3)
Motion-related Commands
Return
Posx
Exception
Exception Description
Example
1 movej([ 0 , 0 , 90 , 0 , 90 , 0 ], v = 10 , a = 20 )
2
3 x2 = posx( 400 , 300 , 500 , 0 , 180 , 0 )
4
5 x3 = posx([ 350 , 350 , 450 , 0 , 180 , 0 ])
#x3=posx(350, 350, 450, 0, 180, 0)
6
7 x4 = posx(x2) #x4=posx(400, 300,
500, 0, 180, 0)
8
9 movel(x2, v = 100 , a = 200 )
Related commands
• movel()(p. 59)
• movec()(p. 68)
• movejx()(p. 64)
• amovel()(p. 98)
• movec()(p. 68)
• movejx()(p. 64)
- 31 - Programming manual(V2.9.3)
Motion-related Commands
Features
• pos (pose) defined based on the ref coordinate is moved/rotated by the amount equal to delta, and then a
value converted based on the ref_out coordinate is returned.
• In case that the ref coordinate is the tool coordinate, this function retuns the value based on input
parameter(pos)’s coordinate without ref_out coordinate.
Parameters
Return
Value Description
- 32 - Programming manual(V2.9.3)
Motion-related Commands
Exception
Exception Description
Example
1 p0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2
3 movej(p0, v = 30 , a = 30 )
4
5
6
7 x1 = posx( 200 , 200 , 200 , 0 , 180 , 0 )
8
9 delta = [ 100 , 100 , 100 , 0 , 0 , 0 ]
10
11 x2 = trans(x1, delta, DR_BASE, DR_BASE)
12
13
14
15 x1_base = posx( 500 , 45 , 700 , 0 , 180 , 0 )
16
17 x4 = trans(x1_base, [ 10 , 0 , 0 , 0 , 0 , 0 ], DR_TOOL)
18
19 movel(x4, v = 100 , a = 100 , ref = DR_BASE)
20
21
22
23 uu1 = [ 1 , 1 , 0 ]
24
25 vv1 = [ - 1 , 1 , 0 ]
26
27 pos = posx( 559 , 34.5 , 651.5 , 0 , 180.0 , 0 )
28
- 33 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• addto(pos, add_val=None)(p. 40)
Features
• Input parameters for constant-velocity blending motion (moveb and amoveb) with the Posb coordinates
of each waypoint and the data of the unit path type (line or arc) define the unit segment object of the
trajectory to be blended.
• Only posx1 is inputted if seg_type is a line (DR_LINE), and posx2 is also inputted if seg_type is a circle
(DR_CIRCLE). Radius sets the blending radius with the continued segment.
Parameters
Parameter Name Data Type Default Description
Value
Return
Posb
- 34 - Programming manual(V2.9.3)
Motion-related Commands
Exception
Exception Description
Example
1 q0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2
3 movej(q0,vel = 30 ,acc = 60 )
4
5 x0 = posx( 564 , 34 , 690 , 0 , 180 , 0 )
6
7 movel(x0, vel = 200 , acc = 400 ) # Moves to the start
position.
8
9
10
11 x1 = posx( 564 , 200 , 690 , 0 , 180 , 0 )
12
13 seg1 = posb(DR_LINE, x1, radius = 40 )
14
15 x2 = posx( 564 , 100 , 590 , 0 , 180 , 0 )
16
17 x2c = posx( 564 , 200 , 490 , 0 , 180 , 0 )
18
19 seg2 = posb(DR_CIRCLE, x2, x2c, radius = 40 )
20
21 x3 = posx( 564 , 300 , 490 , 0 , 180 , 0 )
22
23 seg3 = posb(DR_LINE, x3, radius = 40 )
24
25 x4 = posx( 564 , 400 , 590 , 0 , 180 , 0 )
26
27 x4c = posx( 564 , 300 , 690 , 0 , 180 , 0 )
28
29 seg4 = posb(DR_CIRCLE, x4, x4c, radius = 40 )
30
31 x5 = posx( 664 , 300 , 690 , 0 , 180 , 0 )
32
33 seg5 = posb(DR_LINE, x5, radius = 40 )
34
35 x6 = posx( 564 , 400 , 690 , 0 , 180 , 0 )
36
37 x6c = posx( 664 , 500 , 690 , 0 , 180 , 0 )
38
39 seg6 = posb(DR_CIRCLE, x6, x6c, radius = 40 )
- 35 - Programming manual(V2.9.3)
Motion-related Commands
40
41 x7 = posx( 664 , 400 , 690 , 0 , 180 , 0 )
42
43 seg7 = posb(DR_LINE, x7, radius = 40 )
44
45 x8 = posx( 664 , 400 , 590 , 0 , 180 , 0 )
46
47 x8c = posx( 564 , 400 , 490 , 0 , 180 , 0 )
48
49 seg8 = posb(DR_CIRCLE, x8, x8c, radius = 0 ) # The last
radius must be 0.
50 # If not 0, it is processed as 0.
51
52
53
54 b_list = [seg1, seg2, seg3, seg4, seg5, seg6, seg7, seg8]
55
56
57
58 moveb(b_list, vel = 200 , acc = 400 )
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• moveb()(p. 81)
• amoveb()(p. 114)
Features
This function receives the input data of joint angles or equivalent forms (float[6]) in the joint space and returns
the TCP (objects in the task space) based on the ref coordinate.
Parameters
- 36 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
Exception
Exception Description
Example
1 q1 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2
3 movej(q1,v = 10 ,a = 20 )
4
5 q2 = posj( 30 , 0 , 90 , 0 , 90 , 0 )
6
7 x2 = fkin(q2, DR_WORLD)
8 # x2: Space coordinate at the edge of the robot (TCP)
corresponding to joint value q2
9 movel(x2,v = 100 ,a = 200 ,ref = DR_WORLD) # Linear motion to x2
- 37 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• set_tcp(name)(p. 51)
• The tcp information of the name registered in the teach pendant is reflected during fkin operation.
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
Features
This function returns the joint position corresponding to sol_space, which is equivalent to the robot pose in the
operating space, among 8 joint shapes. Joint position is returned according to closest joint position depend on
option(ref_pos_opt). Through status of return value, you can check whether current robot pose is in wrist
singularity or out of operating region.
Note
After SW version V2.9, if the accuracy of robot is corrected when using this function, the accuracy
correction algorithm operates. The level of accuracy is adjustable according to the option
(iter_threshold). Also, depending on the robot posture, there may be a delay of up to 0.1 seconds.
Parameters
iter_threshold list (float[2]) 0.005 If the accuracy has been corrected, the level of the accuracy co
The norm value of TCP position (X, Y, Z) [mm]
- 38 - Programming manual(V2.9.3)
Motion-related Commands
0.01 If the accuracy has been corrected, the level of the accuracy co
The norm value of TCP orientation (A, B, C) [deg]
Return
Value Description
Exception
Exception Description
- 39 - Programming manual(V2.9.3)
Motion-related Commands
Exception Description
Example
Related commands
• set_tcp(name)(p. 51)
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
Features
This function creates a new posj object by adding add_val to each joint value of posj.
Parameters
- 40 - Programming manual(V2.9.3)
Motion-related Commands
add_val list (float[6]) None List of add values to be added to the position
• No value is added if it is None or [].
Return
Value Description
Exception
Exception Description
Example
1 q1 = posj( 10 , 20 , 30 , 40 , 50 , 60 )
2
3 movej (q1, v = 10 , a = 20 )
4
5 q2 = addto(q1, [ 0 , 0 , 0 , 0 , 45 , 0 ])
6
7 movej (q2, v = 10 , a = 20 ) # The robot moves to the joint (10,
20, 30, 40, 95, 60).
8 q3 = addto(q2, [])
9
10 q4 = addto(q3)
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
- 41 - Programming manual(V2.9.3)
Motion-related Commands
3.2.1 set_velj(vel)
Features
This function sets the global velocity in joint motion (movej, movejx, amovej, or amovejx) after using this
command. The default velocity is applied to the globally set vel if movej() is called without the explicit input of
the velocity argument.
Parameters
Return
Value Description
0 Success
Exception
Exception Description
Example
1 #1
2 Q1 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 Q2 = posj( 0 , 0 , 0 , 0 , 90 , 0 )
4 movej(Q1, vel = 10 , acc = 20 )
5 set_velj( 30 ) # The global joint velocity is set to 30 (deg/
sec).
- 42 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• movej()(p. 54)
• movejx()(p. 64)
• movesj()(p. 74)
• amovej()(p. 95)
• amovejx()(p. 101)
• amovesj()(p. 108)
3.2.2 set_accj(acc)
Features
This function sets the global velocity in joint motion (movej, movejx, amovej, or amovejx) after using this
command. The globally set acceleration is applied as the default acceleration if movej() is called without the
explicit input of the acceleration argument.
Parameters
- 43 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
1 #1
2 Q1 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 Q2 = posj( 0 , 0 , 0 , 0 , 90 , 0 )
4 movej(Q1, vel = 10 , acc = 20 )
5 set_velj( 30 ) # The global joint velocity is set to 30 (deg/
sec). [See set_velj().]
6 set_accj( 60 ) # The global joint acceleration is set to 60 (deg/
sec2).
7 movej(Q2) # The joint motion acceleration to Q2 is 60(deg/
sec2) which is the global acceleration.
8 movej(Q1, vel = 20 , acc = 40 ) # The joint motion acceleration
to Q1 is 40(deg/sec2) which is the specified acceleration.
9 #2
10 set_accj( 30.55 )
11 set_accj([ 30 , 40 , 30 , 30 , 30 , 10 ])
Related commands
• set_velj(vel)(p. 42)
• movej()(p. 54)
• movejx()(p. 64)
• movesj()(p. 74)
• amovej()(p. 95)
• amovejx()(p. 101)
• amovesj()(p. 108)
- 44 - Programming manual(V2.9.3)
Motion-related Commands
Features
This function sets the velocity of the task space motion globally. The globally set velocity velx is applied as the
default velocity if the task motion such as movel(), amovel(), movec(), movesx() is called without the explicit
input of the velocity value. In the set value, vel1 and vel2 define the linear velocity and rotating velocity,
relatively, of TCP.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 #1
2 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 movej(P0)
4 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
5 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
6 movel(P1, vel = 10 , acc = 20 )
7 set_velx( 30 , 20 ) # The global task velocity is set to 30(mm/
sec) and 20(deg/sec).
8 set_accx( 60 , 40 ) # The global task acceleration is set to
60(mm/sec2) and 40(deg/sec2).
- 45 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• amovel()(p. 98)
• amovec()(p. 104)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
3.2.4 set_velx(vel)
Features
This function sets the linear velocity of the task space motion globally. The globally set velocity vel is applied as
the default velocity if the task motion such as movel(), amovel(), movec(), movesx() is called without the explicit
input of the velocity value. The set value vel defines the linear velocity of the TCP while the rotating velocity of
the TCP is determined proportionally to the linear velocity.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
- 46 - Programming manual(V2.9.3)
Motion-related Commands
Exception
Exception Description
Example
1 #1
2 p0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 movej(p0)
4 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
5 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
6 movel(P1, vel = 10 , acc = 20 )
7 set_velx( 30 ) # The global task velocity is set to 30 (mm/sec).
The global task angular velocity is automatically determined.
8 set_accx( 60 ) # The global task acceleration is set to 60 (mm/
sec2). The global task angular acceleration is automatically
determined.
9 movel(P2) # The task motion linear velocity to P2 is 30(mm/sec)
which is the global velocity.
10 movel(P1, vel = 20 , acc = 40 ) # The task motion linear velocity
to P1 is 20(mm/sec) which is the specified velocity.
11 #2
12 set_velx( 10.5 ) # Decimal point input is possible.
Related commands
• set_accx(acc1, acc2)(p. 48)
• set_accj(acc)(p. 43)
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
- 47 - Programming manual(V2.9.3)
Motion-related Commands
Features
This function sets the acceleration of the task space motion globally. The globally set acceleration accx is
applied as the default acceleration if the task motion such as movel(), amovel(), movec(), movesx() is called
without the explicit input of the acceleration value. In the set value, acc1 and acc2 define the linear acceleration
and rotating acceleration, relatively, of the TCP.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
4 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
5 movel(P1, vel = 10 , acc = 20 )
6 set_velx( 30 , 20 ) # The global task velocity is set to 30(mm/
sec) and 20(deg/sec).
7 set_accx( 60 , 40 ) # The global task acceleration is set to
60(mm/sec2) and 40(deg/sec2).
- 48 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
3.2.6 set_accx(acc)
Features
This function sets the linear acceleration of the task space motion globally. The globally set acceleration acc is
applied as the default acceleration if the task motion such as movel(), amovel(), movec(), movesx() is called
without the explicit input of the acceleration value. The set value acc defines the linear acceleration of the TCP
while the rotating acceleration of the TCP is determined proportionally to the linear acceleration.
Parameters
Parameter Value Data Type Default Description
Value
Return
Value Description
0 Success
- 49 - Programming manual(V2.9.3)
Motion-related Commands
Exception
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
4 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
5 movej(P0, vel = 10 , acc = 20 )
6 movel(P1, vel = 10 , acc = 20 )
7 set_velx( 30 ) # The global task velocity is set to 30 (mm/
sec). The global task angular velocity is automatically
determined.
8 set_accx( 60 ) # The global task acceleration is set to 60
(mm/sec2). The global task angular acceleration is automatically
determined.
9 movel(P2) # The task motion linear acceleration to P2 is
60(mm/sec2) which is the global acceleration.
10 movel(P1, vel = 20 , acc = 40 ) # The task motion linear
acceleration to P1 is 40(mm/sec2) which is the specified
acceleration.
Related commands
• set_velx(vel1, vel2)1
• set_velx(vel)2
• movel()3
• movec()4
• movesx()5
• moveb()6
• move_spiral()7
• movel()8
1 http://manual.doosanrobotics.com/display/Programming/.set_velx%28vel1%2C+vel2%29+v2.8reworking
2 http://manual.doosanrobotics.com/display/Programming/.set_velx%28vel%29+v2.8reworking
3 http://manual.doosanrobotics.com/display/Programming/.movel%28%29+v2.8reworking
4 http://manual.doosanrobotics.com/display/Programming/.movec%28%29+v2.8reworking
5 http://manual.doosanrobotics.com/display/Programming/.movesx%28%29+v2.8reworking
6 http://manual.doosanrobotics.com/display/Programming/.moveb%28%29+v2.8reworking
7 http://manual.doosanrobotics.com/display/Programming/.move_spiral%28%29+v2.8reworking
8 http://manual.doosanrobotics.com/display/Programming/.movel%28%29+v2.8reworking
- 50 - Programming manual(V2.9.3)
Motion-related Commands
• movec()9
• movesx()10
• amoveb()11
• amove_spiral()12
3.2.7 set_tcp(name)
Features
his function calls the name of the TCP registered in the Teach Pendant and sets it as the current TCP.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
9 http://manual.doosanrobotics.com/display/Programming/.movec%28%29+v2.8reworking
10 http://manual.doosanrobotics.com/display/Programming/.movesx%28%29+v2.8reworking
11 http://manual.doosanrobotics.com/display/Programming/.amoveb%28%29+v2.8reworking
12 http://manual.doosanrobotics.com/display/Programming/.amove_spiral%28%29+v2.8reworking
- 51 - Programming manual(V2.9.3)
Motion-related Commands
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3 set_tcp( "tcp1" ) # The TCP data registered as tcp1 in the TP is
called and set to the current TCP value.
4 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
5 movel(P1, vel = 10 , acc = 20 ) # Moves the recognized center of
the tool to the P1 position.
Related commands
• fkin(pos, ref)(p. 36)
• ikin(pos, sol_space, ref, ref_pos_opt, iter_threshold)(p. 38)
• movel()13
• movec()14
• movesx()15
• moveb()16
• move_spiral()17
• movel()18
• movec()19
• movesx()20
• amoveb()21
• amove_spiral()22
3.2.8 set_ref_coord(coord)
Features
This function sets the reference coordinate system.
13 http://manual.doosanrobotics.com/display/Programming/.movel%28%29+v2.8reworking
14 http://manual.doosanrobotics.com/display/Programming/.movec%28%29+v2.8reworking
15 http://manual.doosanrobotics.com/display/Programming/.movesx%28%29+v2.8reworking
16 http://manual.doosanrobotics.com/display/Programming/.moveb%28%29+v2.8reworking
17 http://manual.doosanrobotics.com/display/Programming/.move_spiral%28%29+v2.8reworking
18 http://manual.doosanrobotics.com/display/Programming/.movel%28%29+v2.8reworking
19 http://manual.doosanrobotics.com/display/Programming/.movec%28%29+v2.8reworking
20 http://manual.doosanrobotics.com/display/Programming/.movesx%28%29+v2.8reworking
21 http://manual.doosanrobotics.com/display/Programming/.amoveb%28%29+v2.8reworking
22 http://manual.doosanrobotics.com/display/Programming/.amove_spiral%28%29+v2.8reworking
- 52 - Programming manual(V2.9.3)
Motion-related Commands
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 p0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(p0, v = 30 , a = 30 )
3 x1 = posx( 370.9 , 419.7 , 651.5 , 90 , - 180 , 0 )
4 movel(x1, v = 100 , a = 100 ) # Base Coordinate basis
- 53 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• movel()23
• movejx()(p. 64)
• movec()24
• movesx()25
• moveb()26
• move_spiral()27
• move_periodic()(p. 89)
3.3.1 movej()
Features
The robot moves to the target joint position (pos) from the current joint position.
23 http://manual.doosanrobotics.com/display/Programming/.movel%28%29+v2.8reworking
24 http://manual.doosanrobotics.com/display/Programming/.movec%28%29+v2.8reworking
25 http://manual.doosanrobotics.com/display/Programming/.movesx%28%29+v2.8reworking
26 http://manual.doosanrobotics.com/display/Programming/.moveb%28%29+v2.8reworking
27 http://manual.doosanrobotics.com/display/Programming/.move_spiral%28%29+v2.8reworking
- 54 - Programming manual(V2.9.3)
Motion-related Commands
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time, r:radius)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the radius is None, it is set to the blending radius in the blending section and 0 otherwise.
- 55 - Programming manual(V2.9.3)
Motion-related Commands
• If a new motion (following motion) is executed before the motion being executed (previous
motion) is completed, the previous motion and the following motion are smoothly connected
(Motion Blending). It is possible to set the option ra, which can determine whether to maintain
or cancel the target of the previous motion, for the following motion. (Maintain:
ra=DR_MV_RA_DUPLICATE / Cancel: ra=DR_MV_RA_OVERRIDE) For example, in the figure
below, if the following motion is executed at the “2nd motion event” point of a previous motion
with the target, “Target#1,” and if the option ra=DR_MV_RA_DUPLICATE is set for the following
motion, the motion will follow the orange trajectory, as the motion maintains the target of the
previous motion, and if option ra=DR_MV_RA_OVERRIDE is set for the following motion, the
motion will follow the green trajectory, as it cancels the target of the previous motion.
Caution
If the following motion is blended with the conditions of ra=DR_MV_RA_DUPLICATE and radius>0, the
preceding motion can be terminated when the following motion is terminated while the remaining
motion time determined by the remaining distance, velocity, and acceleration of the preceding motion is
greater than the motion time of the following motion. Refer to the following image for more information.
- 56 - Programming manual(V2.9.3)
Motion-related Commands
• In versions below SW V2.8, if the blending radius exceeds 1/2 of the total moving distance, the
motion is not operated because it affects the motion after blending, and the running task
program is terminated when a blending error occurs
• In SW V2.8 or later, if the blending radius exceeds 1/2 of the total moving distance, the blending
radius size is automatically changed to 1/2 of the total moving distance, and the change history
can be checked in the information log message.
- 57 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
1 Q1 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 Q2 = posj( 0 , 0 , 0 , 0 , 90 , 0 )
3 movej(Q1, vel = 10 , acc = 20 )
4 # Moves to the Q1 joint angle at the velocity of 10(deg/sec)
and acceleration of 20(deg/sec2).
5 movej(Q2, time = 5 )
6 # Moves to the Q2 joint angle with a reach time of 5 sec.
7 movej(Q1, v = 30 , a = 60 , r = 200 )
8 # Moves to the Q1 joint angle and is set to execute the next
motion
9 # when the distance from the Q1 space position is 200mm.
10 movej(Q2, v = 30 , a = 60 , ra = DR_MV_RA_OVERRIDE)
11 # Immediately terminates the last motion and blends it to
move to the Q2 joint angle.
- 58 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• amovej()(p. 95)
3.3.2 movel()
Features
The robot moves along the straight line to the target position (pos) within the task space.
Parameters
- 59 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time, r:radius)
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velx.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accx.)
• If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear
velocity of the motion while the angular velocity is determined proportionally to the linear
velocity.
• If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear
acceleration of the motion while the angular acceleration is determined proportionally to the
linear acceleration.
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the radius is None, it is set to the blending radius in the blending section and 0 otherwise.
• _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be
set by the set_ref_coord command.)
• If ‘app_type’ is ‘DR_MV_APP_WELD’, parameter ‘vel’ is internally replaced by the speed setting
entered in app_weld_set_weld_cond(), not the input value of ‘vel’.
• If a new motion (following motion) is executed before the motion being executed (previous
motion) is completed, the previous motion and the following motion are smoothly connected
(Motion Blending). It is possible to set the option ra, which can determine whether to maintain
or cancel the target of the previous motion, for the following motion. (Maintain:
ra=DR_MV_RA_DUPLICATE / Cancel: ra=DR_MV_RA_OVERRIDE) For example, in the figure
- 60 - Programming manual(V2.9.3)
Motion-related Commands
below, if the following motion is executed at the “2nd motion event” point of a previous motion
with the target, “Target#1,” and if the option ra=DR_MV_RA_DUPLICATE is set for the following
motion, the motion will follow the orange trajectory, as the motion maintains the target of the
previous motion, and if option ra=DR_MV_RA_OVERRIDE is set for the following motion, the
motion will follow the green trajectory, as it cancels the target of the previous motion.
Caution
If the following motion is blended with the conditions of ra=DR_MV_RA_DUPLICATE and radius>0, the
preceding motion can be terminated when the following motion is terminated while the remaining
motion time determined by the remaining distance, velocity, and acceleration of the preceding motion is
greater than the motion time of the following motion. Refer to the following image for more information.
- 61 - Programming manual(V2.9.3)
Motion-related Commands
• In versions below SW V2.8, if the blending radius exceeds 1/2 of the total moving distance, the
motion is not operated because it affects the motion after blending, and the running task
program is terminated when a blending error occurs
• In SW V2.8 or later, if the blending radius exceeds 1/2 of the total moving distance, the blending
radius size is automatically changed to 1/2 of the total moving distance, and the change history
can be checked in the information log message.
Return
Value Description
0 Success
- 62 - Programming manual(V2.9.3)
Motion-related Commands
Value Description
Exception
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0, v = 30 , a = 30 )
3 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
4 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
5 P3 = posx( 30 , 30 , 30 , 0 , 0 , 0 )
6 movel(P1, vel = 30 , acc = 100 )
7 # Moves to the P1 position with a velocity of 30(mm/sec) and
acceleration of 100(mm/sec2).
8 movel(P2, time = 5 )
9 # Moves to the P2 position with a reach time of 5 sec.
10 movel(P3, time = 5 , ref = DR_TOOL, mod = DR_MV_MOD_REL)
11 # Moves the robot from the start position to the relative
position of P3 in the tool coordinate system
12 # with a reach time of 5 sec.
13 movel(P2, time = 5 , r = 10 )
14 # Moves the robot to the P2 position with a reach time of 5
seconds,
15 # and the next motion is executed when the distance from the
P2 position is 10mm.
- 63 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• amovel()(p. 98)
3.3.3 movejx()
Features
The robot moves to the target position (pos) within the joint space.
Since the target position is inputted as a posx form in the task space, it moves in the same way as movel.
However, since this robot motion is performed in the joint space, it does not guarantee a linear path to the
target position. In addition, one of 8 types of joint combination (robot configurations) corresponding to the task
space coordinate system (posx) must be specified in sol (solution space).
Parameters
Parameter Name Data Type Default Value Description
- 64 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time, r:radius)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the radius is None, it is set to the blending radius in the blending section and 0 otherwise.
• _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be
set by the set_ref_coord command.)
• Using the blending in the preceding motion generates an error in the case of input with relative
motion (mod=DR_MV_MOD_REL), and it is recommended to blend using movej() or movel().
• Refer to the description of movej() and movel() for blending according to option ra and vel/acc.
Caution
• In versions below SW V2.8, if the blending radius exceeds 1/2 of the total moving distance, the
motion is not operated because it affects the motion after blending, and the running task
program is terminated when a blending error occurs
- 65 - Programming manual(V2.9.3)
Motion-related Commands
• In SW V2.8 or later, if the blending radius exceeds 1/2 of the total moving distance, the blending
radius size is automatically changed to 1/2 of the total moving distance, and the change history
can be checked in the information log message.
Return
Value Description
0 Success
Exception
Exception Description
- 66 - Programming manual(V2.9.3)
Motion-related Commands
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2
3 movej(P0, v = 30 , a = 30 )
4
5 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
6
7 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
8
9 movel(P2, vel = 100 , acc = 200 ) # Linear movement to P2
10
11 X_tmp, sol_init = get_current_posx() # Obtains the current
solution space from the P2 position
12
13 movejx(P1, vel = 30 , acc = 60 , sol = sol_init)
14
15 # Moves to the joint angle with a velocity and acceleration of
30(deg/sec) and 60(deg/sec2), respectively,
16
17 # when the TCP edge is the P1 position (maintaining the solution
space in the last P2 position)
18
19 movejx(P2, time = 5 , sol = 2 )
20
21 # Moves to the joint angle with a reach time of 5 sec when the TCP
edge is at the P2 position
22
23 # (forcefully sets a solution space to 2)
24
25 movejx(P1, vel = [ 10 , 20 , 30 , 40 , 50 , 60 ], acc = [ 20 ,
20 , 30 , 30 , 40 , 40 ], radius = 100 , sol = 2 )
26
27 # Moves the robot to the joint angle when the TCP edge is at the
P1 position,
28
29 # and the next motion is executed when the distance from the P2
position is 100mm.
30
31 movejx(P2, v = 30 , a = 60 , ra = DR_MV_RA_OVERRIDE, sol = 2 )
32
33 # Immediately terminates the last motion and blends it to move to
the joint angle
34
35 # when the TCP edge is at the P2 position.
- 67 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• get_current_posx(ref)(p. 155)
• amovejx()(p. 101)
3.3.4 movec()
Features
The robot moves along an arc to the target pos (pos2) via a waypoint (pos1) or to a specified angle from the
current position in the task space.
Parameters
- 68 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time, r:radius, angle:an)
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velx.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accx.)
- 69 - Programming manual(V2.9.3)
Motion-related Commands
• If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear
velocity of the motion while the angular velocity is determined proportionally to the linear
velocity.
• If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear
acceleration of the motion while the angular acceleration is determined proportionally to the
linear acceleration.
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the radius is None, it is set to the blending radius in the blending section and 0 otherwise.
• _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be
set by the set_ref_coord command.)
• If the mod is DR_MV_MOD_REL, pos1 and pos2 are defined in the relative coordinate system of
the previous pos. (pos1 is the relative coordinate from the starting point while pos2 is the
relative coordinate from pos1.)
• If the angle is None, it is set to 0.
• If only one angle is entered, the angle applied will be the total rotation angle of the circular
path.
• If two angle values are inputted, angle1 refers to the total rotating angle moving at a constant
velocity on the circular path while angle2 refers to the rotating angle in the rotating section for
acceleration and deceleration. In that case, the total moving angle angle1 + 2 X angle2 moves
along the circular path.
• If ‘app_type’ is ‘DR_MV_APP_WELD’, parameter ‘vel’ is internally replaced by the speed setting
entered in app_weld_set_weld_cond(), not the input value of ‘vel’.
• ‘ori’(orientation mode) is defined as below.
a. DR_MV_ORI_TEACH(orientation based on teaching) : It moves while changing the
current pose to the teaching pose of Pose 2, proportionate to the movement distance.
The orientation of the taught pose, ‘pose 1’ is ignored.
b. DR_MV_ORI_FIXED(fixed orientation) : Move along the path while maintaining the initial
orientation up to the taught pose, ‘pose2’.
c. DR_MV_ORI_RADIAL(orientation constrained radially) : Move along the path while
maintaining radial orientation at the initial pose to the ‘pose 2’.
• If a new motion (following motion) is executed before the motion being executed (previous
motion) is completed, the previous motion and the following motion are smoothly connected
(Motion Blending). It is possible to set the option ra, which can determine whether to maintain
or cancel the target of the previous motion, for the following motion. (Maintain:
- 70 - Programming manual(V2.9.3)
Motion-related Commands
Caution
If the following motion is blended with the conditions of ra=DR_MV_RA_DUPLICATE and radius>0, the
preceding motion can be terminated when the following motion is terminated while the remaining
motion time determined by the remaining distance, velocity, and acceleration of the preceding motion is
greater than the motion time of the following motion. Refer to the following image for more information.
- 71 - Programming manual(V2.9.3)
Motion-related Commands
• In versions below SW V2.8, if the blending radius exceeds 1/2 of the total moving distance, the
motion is not operated because it affects the motion after blending, and the running task
program is terminated when a blending error occurs
• In SW V2.8 or later, if the blending radius exceeds 1/2 of the total moving distance, the blending
radius size is automatically changed to 1/2 of the total moving distance, and the change history
can be checked in the information log message.
Return
Value Description
0 Success
- 72 - Programming manual(V2.9.3)
Motion-related Commands
Exception
Exception Description
Example
1 #1
2 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 movej(P0)
4 set_velx( 30 , 20 ) # Set the global task velocity to 30(mm/sec)
and 20(deg/sec).
5 set_accx( 60 , 40 ) # Set the global task acceleration to 60(mm/
sec2) and 40(deg/sec2).
6
7 P1 = posx( 400 , 500 , 800 , 0 , 180 , 0 )
8 P2 = posx( 400 , 500 , 500 , 0 , 180 , 0 )
9 P3 = posx( 100 , 300 , 700 , 45 , 0 , 0 )
10 P4 = posx( 500 , 400 , 800 , 45 , 45 , 0 )
11
12 movec(P1, P2, vel = 30 )
13 # Moves to P2 with a velocity of 30(mm/sec) and global
acceleration of 60(mm/sec2)
14 # via P1 along the arc trajectory.
15 movej(P0)
16 movec(P3, P4, vel = 30 , acc = 60 )
17 # Moves to P4 with a velocity of 30(mm/sec) and acceleration of
60(mm/sec2).
18 # via P3 along the arc trajectory
19 movej(P0).
20 movec(P2, P1, time = 5 )
21 # Moves with a global velocity of 30(mm/sec) and acceleration of
60(mm/sec2).
22 # to P1 along the arc trajectory via P2 at the 5-second point.
23 movec(P3, P4, time = 3 , radius = 100 )
- 73 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• amovec()(p. 104)
3.3.5 movesj()
Features
The robot moves along a spline curve path that connects the current position to the target position (the last
waypoint in pos_list) via the waypoints of the joint space input in pos_list.
The input velocity/acceleration means the maximum velocity/acceleration in the path, and the acceleration and
deceleration during the motion are determined according to the position of the waypoint.
Parameters
- 74 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the mod is DR_MV_MOD_REL, each pos in the pos_list is defined in the relative coordinate of
the previous pos. (If pos_list=[q1, q2, ...,q(n-1), q(n)], q1 is the relative angle of the starting point
while q(n) is the relative coordinate of q(n-1).)
• This function does not support online blending of previous and subsequent motions.
Return
Value Description
0 Success
Exception
Exception Description
- 75 - Programming manual(V2.9.3)
Motion-related Commands
Exception Description
Example
- 76 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• amovesj()(p. 108)
3.3.6 movesx()
Features
The robot moves along a spline curve path that connects the current position to the target position (the last
waypoint in pos_list) via the waypoints of the task space input in pos_list.
The input velocity/acceleration means the maximum velocity/acceleration in the path and the constant velocity
motion is performed with the input velocity according to the condition if the option for the constant speed
motion is selected.
Parameters
- 77 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velx.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accx.)
• If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear
velocity of the motion while the angular velocity is determined proportionally to the linear
velocity.
• If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear
acceleration of the motion while the angular acceleration is determined proportionally to the
linear acceleration.
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be
set by the set_ref_coord command.)
• If the mod is DR_MV_MOD_REL, each pos in the pos_list is defined in the relative coordinate of
the previous pos. (If pos_list=[p1, p2, ...,p(n-1), p(n)], p1 is the relative angle of the starting point
while p(n) is the relative coordinate of p(n-1).)
• This function does not support online blending of previous and subsequent motions.
Caution
The constant velocity motion according to the distance and velocity between the waypoints cannot be
used if the "vel_opt= DR_MVS_VEL_CONST" option (constant velocity option) is selected, and the motion
is automatically switched to the variable velocity motion (vel_opt= DR_MVS_VEL_NONE) in that case.
- 78 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
- 79 - Programming manual(V2.9.3)
Motion-related Commands
- 80 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• amovesx()(p. 111)
3.3.7 moveb()
Features
This function takes a list that has one or more path segments (line or circle) as arguments and moves at a
constant velocity by blending each segment into the specified radius. Here, the radius can be set through posb.
Parameters
Parameter Name Data Type Default Value Description
- 81 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• Up to 50 arguments can be entered in posb_list.
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velx.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accx.)
• If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear
velocity of the motion while the angular velocity is determined proportionally to the linear
velocity.
• If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear
acceleration of the motion while the angular acceleration is determined proportionally to the
linear acceleration.
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be
set by the set_ref_coord command.)
• If the mod is DR_MV_MOD_REL, each pos in the posb_list is defined in the relative coordinate of
the previous pos.
• If ‘app_type’ is ‘DR_MV_APP_WELD’, parameter ‘vel’ is internally replaced by the speed setting
entered in app_weld_set_weld_cond(), not the input value of ‘vel’.
Caution
• A user input error is generated if the blending radius in posb is 0.
• A user input error is generated due to the duplicated input of Line if contiguous Line-Line
segments have the same direction.
• A user input error is generated to prevent a sudden acceleration if the blending condition
causes a rapid change in direction.
• This function does not support online blending of previous and subsequent motions.
- 82 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
1 # CASE 1) ABSOLUTE
2 # Absolute Goal Poses
3 X1 = posx( 370 , 670 , 650 , 0 , 180 , 0 )
4 X1a = posx( 370 , 670 , 400 , 0 , 180 , 0 )
5 X1a2 = posx( 370 , 545 , 400 , 0 , 180 , 0 )
6 X1b = posx( 370 , 595 , 400 , 0 , 180 , 0 )
7 X1b2 = posx( 370 , 670 , 400 , 0 , 180 , 0 )
8 X1c = posx( 370 , 420 , 150 , 0 , 180 , 0 )
9 X1c2 = posx( 370 , 545 , 150 , 0 , 180 , 0 )
10 X1d = posx( 370 , 670 , 275 , 0 , 180 , 0 )
11 X1d2 = posx( 370 , 795 , 150 , 0 , 180 , 0 )
12
13 seg11 = posb(DR_LINE, X1, radius = 20 )
14 seg12 = posb(DR_CIRCLE, X1a, X1a2, radius = 20 )
15 seg14 = posb(DR_LINE, X1b2, radius = 20 )
16 seg15 = posb(DR_CIRCLE, X1c, X1c2, radius = 20 )
- 83 - Programming manual(V2.9.3)
Motion-related Commands
1 # CASE 2) RELATIVE
2 # Relative Goal Poses
3 dX1 = posx( 0 , 250 , 0 , 0 , 0 , 0 )
4 dX1a = posx( 0 , 0 , - 150 , 0 , 0 , 0 )
5 dX1a2 = posx( 0 , - 125 , 0 , 0 , 0 , 0 )
6 dX1b = posx( 0 , 50 , 0 , 0 , 0 , 0 )
7 dX1b2 = posx( 0 , 75 , 0 , 0 , 0 , 0 )
8 dX1c = posx( 0 , - 250 , - 250 , 0 , 0 , 0 )
9 dX1c2 = posx( 0 , 125 , 0 , 0 , 0 , 0 )
10 dX1d = posx( 0 , 125 , 125 , 0 , 0 , 0 )
11 dX1d2 = posx( 0 , 125 , - 125 , 0 , 0 , 0 )
12
13 dseg11 = posb(DR_LINE, dX1, radius = 20 )
14 dseg12 = posb(DR_CIRCLE, dX1a, dX1a2, radius = 20 )
15 dseg14 = posb(DR_LINE, dX1b2, radius = 20 )
16 dseg15 = posb(DR_CIRCLE, dX1c, dX1c2, radius = 20 )
17 dseg16 = posb(DR_CIRCLE, dX1d, dX1d2, radius = 20 )
18 db_list1 = [dseg11, dseg12, dseg14, dseg15, dseg16]
19 # The blending radius of the last waypoint (dseg16) is ignored.
20
21 movej(Jx1, vel = 30 , acc = 60 , mod = DR_MV_MOD_ABS)
22 # Joint motion to the initial angle (Jx1)
23 movel(X0, vel = 150 , acc = 250 , ref = DR_BASE, mod = DR_MV_MOD_A
BS)
24 # Line motion to the initial position (X0)
25 moveb(b_list1, vel = 150 , acc = 250 , ref = DR_BASE, mod = DR_MV_
MOD_ABS)
26 # Moves the robot from the current position through a
trajectory consisting of dseg11(LINE), dseg12(CIRCLE),
dseg14(LINE),
- 84 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posb(seg_type, posx1, posx2=None, radius=0)(p. 34)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• amoveb()(p. 114)
3.3.8 move_spiral()
Features
Motion along a spiral trajectory on a plane which is perpendicular to the input 'axis' is performed on the
specified coordinate system 'ref'. Additional input, travel distance 'lmax' can cause the robot to move around a
cone, starting from the apex of it.
Parameters
Parameter Data Default Value Range Description
Name Type
- 85 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• rev refers to the total number of revolutions of the spiral motion.
• Rmax refers to the maximum radius of the spiral motion.
• Lmax refers to the parallel distance in the axis direction during the motion. A negative value
means the parallel distance in the –axis direction.
• Vel refers to the moving velocity of the spiral motion.
• The first value of _global_velx (parallel velocity) is applied if vel is None. (The initial value of
_global_velx is 0.0 and can be set by set_velx.)
• acc refers to the moving acceleration of the spiral motion.
• The first value of _global_accx (parallel acceleration) is applied if acc is None. (The initial value
of _global_accx is 0.0 and can be set by set_accx.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• The axis defines the axis that is perpendicular to the surface defined by the spiral motion.
• Ref refers to the reference coordinate system defined by the spiral motion.
• This function does not support online blending of previous and subsequent motions.
Caution
• An error can be generated to ensure safe motion if the rotating acceleration calculated by the
spiral path is too great.
In this case, reduce the vel, acc, or time value.
- 86 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
1 # hole search
2 # (A motion that completes 9.5 revolutions (rev) to the 50 mm
radius (rmax) from 0 on the Tool-X/Y surface as the center of the
rotation in the Tool-Z direction and the spiral trajectory that
moves 50 mm (lmax) in the Tool-Z direction at the same time in 10
seconds from the initial position)
3
4 J00 = posj( 0 , 0 , 90 , 0 , 60 , 0 )
5 movej(J00,vel = 30 ,acc = 30 ) # Joint movement to the
initial pose
6 move_spiral(rev = 9.5 ,rmax = 20.0 ,lmax = 50.0 ,time = 20.0 ,axis
= DR_AXIS_Z,ref = DR_TOOL)
- 87 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• amove_spiral()(p. 118)
- 88 - Programming manual(V2.9.3)
Motion-related Commands
3.3.9 move_periodic()
Features
This function performs the cyclic motion based on the sine function of each axis (parallel and rotation) of the
reference coordinate (ref) input as a relative motion that begins at the current position. The attributes of the
motion on each axis are determined by the amplitude and period, and the acceleration/deceleration time and
the total motion time are set by the interval and repetition count.
Parameters
Note
• Amp refers to the amplitude. The input is a list of 6 elements which are the amp values for the
axes (x, y, z, rx, ry, and rz). The amp input on the axis that does not have a motion must be 0.
• Period refers to the time needed to complete a motion in the direction, the amplitude. The
input is a list of 6 elements which are the periods for the axes (x, y, z, rx, ry, and rz).
• Atime refers to the acceleration and deceleration time at the beginning and end of the periodic
motion. The largest of the inputted acceleration/deceleration times and maximum period*1/4
- 89 - Programming manual(V2.9.3)
Motion-related Commands
is applied. An error is generated when the inputted acceleration/deceleration time exceeds 1/2
of the total motion time.
• Repeat refers to the number of repetitions of the axis (reference axis) that has the largest period
value and determines the total motion time. The number of repetitions for each of the
remaining axes is determined automatically according to the motion time.
• If the motion terminates normally, the motions for the remaining axes can be terminated
before the reference axis's motion terminates so that the end position matches the starting
position. The deceleration section will deviate from the previous path if the motions of all axes
are not terminated at the same time. Refer to the following image for more information.
- 90 - Programming manual(V2.9.3)
Motion-related Commands
- 91 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
- 92 - Programming manual(V2.9.3)
Motion-related Commands
Exception
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3
4 #1
5 move_periodic(amp = [ 10 , 0 , 0 , 0 , 30 , 0 ], period = 1.0 ,
atime = 0.2 , repeat = 5 , ref = DR_TOOL)
6 # Repeats the x-axis (10mm amp and 1 sec. period) motion and
rotating y-axis (30deg amp and 1 sec. period) motion in the tool
coordinate system
7 # totally, repeat the motion 5 times.
8
9 #2
10 move_periodic(amp = [ 10 , 0 , 20 , 0 , 0.5 , 0 ], period = [ 1 , 0
.5 , 0 , 0 , 0 ], atime = 0.5 , repeat = 3 , ref = DR_BASE)
11 # Repeats the x-axis (10mm amp and 1 sec. period) motion and
z-axis (20mm amp and 1.5 sec. period) motion in the base
coordinate system
12 # 3 times. The rotating y-axis motion is not performed since
its period is "0".
13 # The total motion time is about 5.5 sec. (1.5 sec. * 3 times
+ 1 sec. for acceleration/deceleration) since the period of the x-
axis motion is greater.
14 # The x-axis motion is repeated 4.5 times.
Related commands
• set_ref_coord(coord)(p. 52)
- 93 - Programming manual(V2.9.3)
Motion-related Commands
• amove_periodic()(p. 122)
3.3.10 move_home()
Features
Homing is performed by moving to the joint motion to the mechanical or user defined home position. According
to the input parameter [target], it moves to the mechanical home defined in the system or the home set by the
user.
Parameter
Parameter Data Dafault Range Description
Name Type Value
Note
• Homing motion is divided into two steps and performed sequentially.
a. Move to the homing position at the speed specified in the system.
b. Finding the home position precisely
• Safety should be ensured so that there is no danger of collision in the vicinity of homing
operation.
Return
Value Description
0 Success
Exception
Exception Description
- 94 - Programming manual(V2.9.3)
Motion-related Commands
Exception Description
Example
3.4.1 amovej()
Features
The asynchronous movej motion operates in the same way as movej except that it does not have the radius
parameter for blending. The command is the asynchronous motion command, and the next command is
executed at the same time the motion begins.
Note
• movej(pos): The next command is executed after the robot starts from the current position and
reaches (stops at) pos.
• amovej(pos): The next command is executed regardless of whether the robot starts from the
current position and reaches (stops at) pos.
- 95 - Programming manual(V2.9.3)
Motion-related Commands
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• Refer to the description of the movej() motion for the path of blending according to option ra
and vel/acc.
- 96 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
- 97 - Programming manual(V2.9.3)
Motion-related Commands
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• mwait(time=0)(p. 125)
• movej()(p. 54)
3.4.2 amovel()
Features
The asynchronous movel motion operates in the same way as movel except that it does not have the radius
parameter for blending. The command is the asynchronous motion command, and the next command is
executed without waiting for the motion to terminate.
Note
• movel(pos): The next command is executed after the robot starts from the current position and
reaches (stops at) pos.
• amovel(pos): The next command is executed regardless of whether the robot starts from the
current position and reaches (stops at) pos.
Parameters
- 98 - Programming manual(V2.9.3)
Motion-related Commands
Note
• Abbreviated parameter names supported (v:vel, a:acc, t:time).
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velx.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accx.)
• If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear
velocity of the motion while the angular velocity is determined proportionally to the linear
velocity.
• If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear
acceleration of the motion while the angular acceleration is determined proportionally to the
linear acceleration.
• If the time is specified, values are processed based on time, ignoring vel and acc.
- 99 - Programming manual(V2.9.3)
Motion-related Commands
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• mwait(time=0)(p. 125)
• movel()(p. 59)
3.4.3 amovejx()
Features
The asynchronous movejx motion operates in the same way as movejx except that it does not have the radius
parameter for blending. The command is the asynchronous motion command, and the next command is
executed without waiting for the motion to terminate.
Note
• movejx(pos): The next command is executed after the robot starts from the current position
and reaches (stops at) pos.
• amovejx(pos): The next command is executed regardless of whether the robot starts from the
current position and reaches (stops at) pos.
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• _g_coord is applied if the ref is None. The initial value of _g_coord is DR_BASE, and it can be set
by the set_ref_coord command.
• Refer to the description of the movej() motion for the path of the blending according to option
ra and vel/acc.
Caution
If relative motion is entered (mod=DR_MV_MOD_REL), the motion in progress cannot execute blending.
Therefore it is recommended to execute blending with movej() or movel().
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• get_current_posx(ref)(p. 155)
• mwait(time=0)(p. 125)
• movejx()(p. 64)
3.4.4 amovec()
Features
The asynchronous movec motion operates in the same way as movec except that it does not have the radius
parameter for blending. The command is the asynchronous motion command, and the next command is
executed without waiting for the motion to terminate.
Note
• movec(pos1. pos2): The next command is executed after the robot starts from the current
position and reaches (stops at) pos2.
• amovec(pos1. pos2): The next command is executed regardless of whether the robot starts
from the current position and reaches (stops at) pos2.
Parameters
Note
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• mwait(time=0)(p. 125)
• movec()(p. 68)
3.4.5 amovesj()
Features
The asynchronous movesj motion operates in the same way as movesj() except for the asynchronous
processing.
Generating a new command for the motion before the amovesj() motion results in an error for safety reasons.
Therefore, the termination of the amovesj() motion must be confirmed using mwait() or check_motion()
between amovesj() and the following motion command.
Note
• movesj(pos_list): The next command is executed after the robot starts from the current
position and reaches (stops at) the end point of pos_list.
• amovesj(pos_list): The next command is executed regardless of whether the robot starts from
the current position and reaches (stops at) the end point of pos_list.
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• If the mod is DR_MV_MOD_REL, each pos in the pos_list is defined in the relative coordinate of
the previous pos. (If pos_list=[q1, q2, ...,q(n-1), q(n)], q1 is the relative angle of the starting point
while q(n) is the relative coordinate of q(n-1).)
• This function does not support online blending of previous and subsequent motions.
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• mwait(time=0)(p. 125)
• amovesj(p. 108)
3.4.6 amovesx()
Features
The asynchronous movesx motion operates in the same way as movesx() except for the asynchronous
processing.
Generating a new command for the motion before the amovesj() motion results in an error for safety reasons.
Therefore, the termination of the amovesx() motion must be confirmed using mwait() or check_motion()
between amovesx() and the following motion command.
Note
• movesx(pos_list): The next command is executed after the robot starts from the current
position and reaches (stops at) the end point of pos_list.
• amovesx(pos_list): The next command is executed regardless of whether the robot starts from
the current position and reaches (stops at) the end point of pos_list.
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velx.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accx.)
• If an argument is inputted to vel (e.g., vel=30), the input argument corresponds to the linear
velocity of the motion while the angular velocity is determined proportionally to the linear
velocity.
• If an argument is inputted to acc (e.g., acc=60), the input argument corresponds to the linear
acceleration of the motion while the angular acceleration is determined proportionally to the
linear acceleration.
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• _g_coord is applied if the ref is None. (The initial value of _g_coord is DR_BASE, and it can be
set by the set_ref_coord command.)
• If the mod is DR_MV_MOD_REL, each pos in the pos_list is defined in the relative coordinate of
the previous pos. (If pos_list=[p1, p2, ...,p(n-1), p(n)], p1 is the relative angle of the starting point
while p(n) is the relative coordinate of p(n-1).)
• This function does not support online blending of previous and subsequent motions.
Caution
The constant velocity motion according to the distance and velocity between the waypoints cannot be
used if the "vel_opt= DR_MVS_VEL_CONST" option (constant velocity option) is selected, and the motion
is automatically switched to the variable velocity motion (vel_opt= DR_MVS_VEL_NONE) in that case.
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• mwait(time=0)(p. 125)
• movesx()(p. 77)
3.4.7 amoveb()
Features
The asynchronous moveb motion operates in the same way as moveb() except for the asynchronous processing
and executes the next line after the command is executed.
Generating a new command for the motion before the amoveb() motion results in an error for safety reasons.
Therefore, the termination of the amoveb() motion must be confirmed using mwait() or check_motion()
between amoveb() and the following motion command.
Note
• moveb(seg_list): The next command is executed after the robot starts from the current position
and reaches (stops at) the end point of seg_list.
• amoveb(seg_list): The next command is executed regardless of whether the robot starts from
the current position and reaches (stops at) the end point of seg_list.
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
Caution
• A user input error is generated if the blending radius in posb is 0.
• A user input error is generated due to the duplicated input of Line if contiguous Line-Line
segments have the same direction.
• A user input error is generated to prevent a sudden acceleration if the blending condition
causes a rapid change in direction.
• This function does not support online blending of previous and subsequent motions.
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• posb(seg_type, posx1, posx2=None, radius=0)(p. 34)
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• mwait(time=0)(p. 125)
• moveb()(p. 81)
3.4.8 amove_spiral()
Features
The asynchronous move_spiral motion operates in the same way as move_spiral() except for the asynchronous
processing and executes the next line after the command is executed.
Generating a new command for the motion before the amove_spiral() motion results in an error for safety
reasons. Therefore, the termination of the amove_spiral() motion must be confirmed using mwait() or
check_motion() between amove_spiral() and the following motion command.
Motion along a spiral trajectory on a plane which is perpendicular to the input 'axis' is performed on the
specified coordinate system 'ref'. Additional input, travel distance 'lmax' can cause the robot to move around a
cone, starting from the apex of it
Note
• move_spiral: The next command is executed after the robot starts from the current position
and reaches (stops at) the end point of the spiral trajectory.
• amove_spiral: The next command is executed after the robot starts from the current position
and regardless of whether it reaches (stops at) the end point of the spiral trajectory.
Parameters
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• rev refers to the total number of revolutions of the spiral motion.
• Rmax refers to the maximum radius of the spiral motion.
• Lmax refers to the parallel distance in the axis direction during the motion. A negative value
means the parallel distance in the –axis direction.
• Vel refers to the moving velocity of the spiral motion.
• The first value of _global_velx (parallel velocity) is applied if vel is None. (The initial value of
_global_velx is 0.0 and can be set by set_velx.)
• Acc refers to the moving acceleration of the spiral motion.
• The first value of _global_accx (parallel acceleration) is applied if acc is None. (The initial value
of _global_accx is 0.0 and can be set by set_accx.)
• If the time is specified, values are processed based on time, ignoring vel and acc.
• If the time is None, it is set to 0.
• The axis defines the axis that is perpendicular to the surface defined by the spiral motion.
• Ref refers to the reference coordinate system defined by the spiral motion.
• This function does not support online blending of previous and subsequent motions.
Caution
• An error can be generated to ensure safe motion if the rotating acceleration calculated by the
spiral path is too great.
In this case, reduce the vel, acc, or time value.
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 ## hole search
2 # (A motion that completes 9.5 revolutions (rev) to the 30 mm
radius (rmax) from 0 on the Tool-X/Y surface as the center of the
rotation in the Tool-Z direction
3 # and the spiral trajectory that moves 50 mm (lmax) in the Tool-Z
direction at the same time in 20 seconds
4 # from the initial position.
5 # D-Out (no. 1 channel) 3 seconds after the motion begins.)
6
7 J00 = posj( 0 , 0 , 90 , 0 , 60 , 0 )
8 movel(J00, vel = 30 , acc = 30 ) # Joint moves to the
beginning pose
9 amove_spiral(rev = 9.5 ,rmax = 50.0 ,lmax = 50.0 ,time = 10.0
,axis = DR_AXIS_Z,ref = DR_TOOL)
10 wait( 3 )
11 set_digital_output( 1 , 1 ) # D-Out (no. 1 channel) ON
12 mwait( 0 ) # Waits until the motion
stops.
Related commands
• set_velx(vel1, vel2)(p. 45)
• set_velx(vel)(p. 46)
• set_accx(acc1, acc2)(p. 48)
• set_accx(acc)(p. 49)
• set_tcp(name)(p. 51)
• set_ref_coord(coord)(p. 52)
• mwait(time=0)(p. 125)
• move_spiral()(p. 85)
3.4.9 amove_periodic()
Features
The asynchronous move_periodic motion operates in the same way as move_periodic() except for the
asynchronous processing and executes the next line after the command is executed.
Generating a new command for the motion before the amove_periodic() motion results in an error for safety
reasons. Therefore, the termination of the amove_periodic() motion must be confirmed using mwait() or
check_motion() between amove_periodic() and the following motion command.
This command performs a cyclic motion based on the sine function of each axis (parallel and rotation) of the
reference coordinate (ref) input as a relative motion that begins at the current position. The attributes of the
motion on each axis are determined by amp (amplitude) and period, and the acceleration/deceleration time
and the total motion time are set by the interval and repetition count.
Note
• move_ periodic: Starting from the current position, reaching the end of the periodic trajectory,
stopping, and then executing the following command
• amove_ periodic: Executes the next command immediately regardless of whether the end of
the periodic trajectory is reached from the current position
Parameters
Note
• Amp refers to the amplitude. The input is a list of 6 elements which are the amp values for the
axes (x, y, z, rx, ry, and rz). The amp input on the axis that does not have a motion must be 0.
• Period refers to the time needed to complete a motion in the direction, the amplitude. The
input is a list of 6 elements which are the periods for the axes (x, y, z, rx, ry, and rz).
• Atime refers to the acceleration and deceleration time at the beginning and end of the periodic
motion. The largest of the inputted acceleration/deceleration times and maximum period*1/4
is applied. An error is generated when the inputted acceleration/deceleration time exceeds 1/2
of the total motion time.
• Repeat refers to the number of repetitions of the axis (reference axis) that has the largest period
value and determines the total motion time. The number of repetitions for each of the
remaining axes is determined automatically according to the motion time.
• If the motion terminates normally, the motions for the remaining axes can be terminated
before the reference axis's motion terminates so that the end position matches the starting
position. The deceleration section will deviate from the previous path if the motions of all axes
are not terminated at the same time. Refer to the following image for more information.
Return
Value Success
0 Success
Exception
Exception Description
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3 amove_periodic(amp = [ 10 , 0 , 0 , 0 , 0.5 , 0 ], period = 1 ,
atime = 0.5 , repeat = 5 , ref = DR_TOOL)
4 wait( 1 )
5 set_digital_output( 1 , 1 )
6 mwait( 0 )
7 # Repeats the x-axis (10mm amp and 1 sec. period) motion and y
rotating axis (0.5deg amp and 1 sec. period) motion in the tool
coordinate system
8 # 5 times.
9 # SET(1) the Digital_Output channel no. 1, 1 second after the
periodic motion begins.
Related commands
• set_ref_coord(coord)(p. 52)
• move_periodic()(p. 89)
3.5.1 mwait(time=0)
Features
This function sets the waiting time between the previous motion command and the motion command in the
next line. The waiting time differs according to the time[sec] input.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• wait(time)(p. 265)
• amovej()(p. 95)
• amovel()(p. 98)
• amovejx()(p. 101)
• amovec()(p. 104)
• amovesj()(p. 108)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
• amove_periodic()(p. 122)
3.5.2 begin_blend(radius=0)
Features
This function begins the blending section. The sync motion commands (movej, movel, movec, movejx) with
blending section radius execute blending using the radius set as the default argument. There is no actual
blending effect if the radius is 0. Moreover, if a blending radius that is different from the set radius is needed, the
blending radius can be changed as an exception by specifying the blending radius to the motion argument.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 #1
2 begin_blend(radius = 30 )
3 # The motion commands with the following radius option sets
4 # the blending section to 30mm.
5 Q1 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
6 Q2 = posj( 0 , 0 , 0 , 0 , 90 , 0 )
7 movej(Q1, vel = 10 , acc = 20 )
8 # Moves to the Q1 joint angle and is set to execute the next
motion
9 # when the global distance from the Q1 space position is
30mm.
10 movej(Q2, time = 5 )
11 # Moves to the Q2 joint angle after the blend while
maintaining the last motion (motion iteration).
12 # It is set to execute the next motion
13 # when the global distance from the Q2 space position is
30mm.
14 movej(Q1, v = 30 , a = 60 , r = 200 )
15 # Moves to the Q1 joint angle after the blending while
maintaining the last motion (motion iteration).
16 # It is set to execute the next motion
17 # when the distance from the Q1 space position is 200mm (the
global setting is not applied).
18 movej(Q2, v = 30 , a = 60 , ra = DR_MV_RA_OVERRIDE)
19 # Immediately terminates the last motion and blends it to
move to the Q2 joint angle.
20
21 end_blend() # Ends the batch setting of the blending
sections.
Related commands
• end_blend()(p. 129)
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
3.5.3 end_blend()
Features
This function ends the blending section. It means that the validity of the blending section that began with
begin_blend() ends.
Return
Value Description
0 Success
Example
1 #1
2 begin_blend(radius = 30 )
3 # The motion commands that have the following radius option
set the blending section to 30mm.
4 Q1 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
5 Q2 = posj( 0 , 0 , 0 , 0 , 90 , 0 )
6 movej(Q1, vel = 10 , acc = 20 )
7 # Moves to the Q1 joint angle and is set to execute the next
motion
8 # when the global distance from the Q1 space position is
30mm.
9 movej(Q2, time = 5 )
10 # Immediately terminates the last motion and blends it to
move to the Q2 joint angle (motion iteration).
11 # It is set to execute the next motion
12 # when the global distance from the Q2 space position is
30mm.
13 movej(Q1, v = 30 , a = 60 , r = 200 )
14 # Immediately terminates the last motion and blends it to
move to the Q1 joint angle (motion iteration).
15 # It is set to execute the next motion
16 # when the distance from the Q1 space position is 200mm (the
global setting is not applied).
17 movej(Q2, v = 30 , a = 60 , ra = DR_MV_RA_OVERRIDE)
18 # Immediately terminates the last motion and blends it to
move to the Q2 joint angle.
19 end_blend() # Ends the batch setting of the blending
sections.
Related commands
• begin_blend(radius=0)(p. 127)
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
3.5.4 check_motion()
Features
This function checks the status of the currently active motion.
Return (TBD)
Value Description
Exception
Exception Description
Example
5 while True :
6 if check_motion() = = 0 : # A motion is completed.
7 amovej (q99, vel = 10 , acc = 20 ) # Joint motion to q99.
8 break
9 if check_motion() = = 2 : # In motion
10 pass
11 mwait( 0 ) # Temporarily suspends the
program execution until the motion is terminated.
Related commands
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
• movesj()(p. 74)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• move_periodic()(p. 89)
• amovej()(p. 95)
• amovel()(p. 98)
• amovejx()(p. 101)
• amovec()(p. 104)
• amovesj()(p. 108)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
• amove_periodic()(p. 122)
3.5.5 stop(st_mode)
Features
This function stops the currently active motion. stop time is determined by the ‘st_mode’ and robot position
does not deviate from the in-progress path.
This command is only used to stop the robot from operating and will not cause stop the program. To stop a
program from running, use additionally exit() function. Values DR_QSTOP_STO and DR_QSTOP respond to Stop
Category 1 (torque off after maximum deceleration) and 2 (maximum deceleration), but they are not linked with
motions, such as torque off, after stopping. DR_SSTOP deceleration time is about 1.5 times longer that the
maximum deceleration time. In the case of DR_HOLD, stop immediately with no deceleration time.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
• movesj()(p. 74)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• move_periodic()(p. 89)
• amovej()(p. 95)
• amovel()(p. 98)
• amovejx()(p. 101)
• amovec()(p. 104)
• amovesj()(p. 108)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
• amove_periodic()(p. 122)
3.5.6 change_operation_speed(speed)
Features
This function adjusts the operation velocity. The argument is the relative velocity in a percentage of the
currently set velocity and has a value from 1 to 100. Therefore, a value of 50 means that the velocity is reduced
to 50% of the currently set velocity.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 change_operation_speed( 10 )
2 change_operation_speed( 100 )
3 #1. Motion with velocity specified to q0 and 20% of the specified
velocity
4 q0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
5 movej (q0, vel = 10 , acc = 20 ) # Moves to q0 at a
velocity of 10mm/sec
6 change_operation_velocity( 10 ) # The velocities of all
following motions executed are 10% of the specified velocity.
7 q1 = posj( 0 , 0 , 0 , 0 , 90 , 0 )
8 movej (q1, vel = 10 , acc = 20 ) # Moves to q1 at a
velocity of 10% of 10mm/sec.
9 change_operation_speed( 100 ) # The velocities of all
following motions executed are 100% of the specified velocity.
10 movej (q0, vel = 10 , acc = 20 ) # Moves to q0 at a
velocity 100% of 10mm/sec
Related commands
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
• movesj()(p. 74)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• move_periodic()(p. 89)
• amovej()(p. 95)
• amovel()(p. 98)
• amovejx()(p. 101)
• amovec()(p. 104)
• amovesj()(p. 108)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
• amove_periodic()(p. 122)
3.5.7 wait_manual_guide()
Features
This function enables the user to perform hand guiding (changing the position of the robot by pressing the
Direct Teach button in the cockpit or the TP) during the execution of the program. The user executes the next
command in one of the following two ways after hand guiding is completed (unless the program is terminated,
it will wait at the command until one of the following is executed after the user performs hand guiding).
1. The user presses the "OK" or "Finish" button on the "Hand Guiding Execution" popup window generated
from the TP.
2. A signal is applied to the digital input channel specified for "Manual guide release" in the safety I/O
settings.
The current TCP position and the TCP position of the hand guided robot must be in the collaborative workspace
in order to execute this command properly. Run the command after specifying the hand guiding area as the
collaborative workspace and enabling it. An error is generated, and the program is terminated to ensure worker
safety if the current position or hand guiding deviates from the collaborative workspace.
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
• movesj()(p. 74)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• move_periodic()(p. 89)
• amovej()(p. 95)
• amovel()(p. 98)
• amovejx()(p. 101)
• amovec()(p. 104)
• amovesj()(p. 108)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
• amove_periodic()(p. 122)
3.5.8 wait_nudge()
Features
This function enables users to resume the execution of the program through the user’s nudge input (applying
external force to the robot) when the execution of the program is paused. When the external force greater than
the force threshold, it will proceed to the following command after the resume time, where the force threshold
and the resume time are set at the collaborative workspace setting menu. This command can be used as an
interlock during the program.
However, if the robot’s configuration is in the singularity area, or if the force is applied continuously after the
nudge input, warning will be occurred for safety.
For this function is allowed to execute within the collaborative workspace, please set the collaborative
workspace, activate it, and assure the TCP position is in this workspace when this command is performed in
advance.
Return
Value Description
0 Success
Value Description
Exception
Exception Description
Example
Related commands
• movej()(p. 54)
• movel()(p. 59)
• movejx()(p. 64)
• movec()(p. 68)
• movesj()(p. 74)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• move_periodic()(p. 89)
• amovej()(p. 95)
• amovel()(p. 98)
• amovejx()(p. 101)
• amovec()(p. 104)
• amovesj()(p. 108)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
• amove_periodic()(p. 122)
3.5.9 enable_alter_motion(n,mode,ref,limit_dPOS,limit_dPOS_per)
Features
enable_alter_motion() and alter_motion() functions enable to alter motion trajectory.
This function sets the configurations for altering function and allows the input quantity of alter_motion() to be
applied to motion trajectory. The unit cycle time of generating alter motion is 100msec. Cycle time(n*100msec)
can be changed through input parameter n. This function provide 2 modes(Accumulation mode, Increment
mode). Input quantity of alter_motion() can be applied to motion trajectory in two ways as accumulated value
or increment value. In accumulation mode, the input quantity means absolute altering
amount(dX,dY,dZ,dRX,dRY,dRZ) from current motion trajectory. On the contrary in increment mode, the
quantity means increment value from the previous absolute altering amount. The reference coordinate can be
changed through input parameter ref. Limitations of accumulation amout and increment amount can be set
through input paramet limit_dPOS (accumulated limit) and limit_dPOS_per(increment input limit during 1
cycle). The actual alter amount is limited to these limits.
Parameters
Parameter Name Data Type Default Description
Value
Note
• _global_ref is applied if ref is None
• Accumulation amount or increment amout isn’t be limited if limit_dPOS or limit_dPOS_per is
None.
• alter_motion() can be executed only in user thread.
Exception
Exception Description
Example
1 def alter_thread():
2 alter_motion(dX) #dX : amount of alter motion
3
4 dX = [ 10 , 0 , 0 , 10 , 0 , 0 ]
5
6 J00 = posj( 0 , 0 , 90 , 0 , 90 )
7 X1 = posx( 559.0 , 200 , 651.5 , 180 , - 180.0 , 180 )
8 X2 = posx( 559.0 , 200 , 400 , 180 , - 180.0 , 180 )
9
10 movej(J00,vel = 50 ,acc = 100 )
11
12 enable_alter_motion(n = 10 ,mode = DR_DPOS, ref = DR_BASE,
limit_dPOS = [ 50 , 90 ], limit_dPOS_per = [ 50 , 50 ])
13 # cycle time:(5*100)msec, mode:accumulate, reference
coordination:base coordination
14 # Lmitation of accumulation amount :50mm,50deg
15 # Limitation of increment amount :10mm, 10deg
16
17 th_id = thread_run(alter_thread, loop = True )
18
19 movel(X1,v = 50 ,a = 100 ,r = 30 )
20 movel(X2,v = 50 ,a = 100 )
21
22 thread_stop(th_id)
23 disable_alter_motion() # deactivates alter motion
Related commands
• alter_motion(pos)(p. 141)
• disable_alter_motion()(p. 143)
3.5.10 alter_motion(pos)
Features
This function applies altering amount of motion trajectory when the alter function is activated. The meaning of
the input values is defined in the description of enable_alter_motion().
Caution
• alter_motion() can be executed only in user thread.
Note
• alter_motion() can be executed only in user thread.
• Alter motion can be adjusted through setting value limit_dPOS or limit_dPOS_per in
enable_alter_motion function.
• Orientation of Input pose follows fixed XYZ notation.
Parameters
Parameter Name Data Type Default Description
Value
Exception
Exception Description
Example
1 def alter_thread():
2 alter_motion(dX) #dX : amount of alter motion
3
4 dX = [ 10 , 0 , 0 , 10 , 0 , 0 ]
5
6 J00 = posj( 0 , 0 , 90 , 0 , 90 )
7 X1 = posx( 559.0 , 200 , 651.5 , 180 , - 180.0 , 180 )
8 X2 = posx( 559.0 , 200 , 400 , 180 , - 180.0 , 180 )
9
10 movej(J00,vel = 50 ,acc = 100 )
11
12 enable_alter_motion(n = 5 ,mode = DR_DPOS, ref = DR_BASE,
limit_dPOS = [ 50 , 90 ], limit_dPOS_per = [ 10 , 10 ])
13 # cycle time:(5*100)msec, mode:accumulate, reference
coordination:base coordination
14 # Lmitation of accumulation amount :50mm,90deg
15 # Limitation of increment amount :10mm, 10deg
16
17 th_id = thread_run(alter_thread, loop = True )
18
19 movel(X1,v = 50 ,a = 100 ,r = 30 )
20 movel(X2,v = 50 ,a = 100 )
21
22 thread_stop(th_id)
23 disable_alter_motion() # deactivates alter motion
Related commands
• enable_alter_motion(n,mode,ref,limit_dPOS,limit_dPOS_per)(p. 139)
• disable_alter_motion()(p. 143)
3.5.11 disable_alter_motion()
Features
This function deactivates alter motion.
Exception
Exception Description
Example
1 def alter_thread():
2 alter_motion(dX) #dX : amount of alter motion
3
4 dX = [ 10 , 0 , 0 , 10 , 0 , 0 ]
5
6 J00 = posj( 0 , 0 , 90 , 0 , 90 )
7 X1 = posx( 559.0 , 200 , 651.5 , 180 , - 180.0 , 180 )
8 X2 = posx( 559.0 , 200 , 400 , 180 , - 180.0 , 180 )
9
10 movej(J00,vel = 50 ,acc = 100 )
11
12 enable_alter_motion(n = 10 ,mode = DR_DPOS, ref = DR_BASE,
limit_dPOS = [ 50 , 90 ], limit_dPOS_per = [ 50 , 50 ])
13 # cycle time:(5*100)msec, mode:accumulate, reference
coordination:base coordination
14 # Lmitation of accumulation amount :50mm,50deg
15 # Limitation of increment amount :10mm, 10deg
16
17 th_id = thread_run(alter_thread, loop = True )
18
19 movel(X1,v = 50 ,a = 100 ,r = 30 )
20 movel(X2,v = 50 ,a = 100 )
21
22 thread_stop(th_id)
23 disable_alter_motion() # deactivates alter motion
Related commands
• enable_alter_motion(n,mode,ref,limit_dPOS,limit_dPOS_per)(p. 139)
• alter_motion(pos)(p. 141)
3.6.1 servoj()
Features
The command is the asynchronous motion command, and the next command is executed at the same time the
motion begins. That motion follows the most recent target joint position that is continuously delivered, within
maximum velocity, acceleration.
Parameters
Parameter Name Data Type Default Value Description
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velj is applied if vel is None. (The initial value of _global_velj is 0.0 and can be set by
set_velj.)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• After time is set, If reach time can’t be keep because of condition of maximum velocity and
acceleration, the reach time is adjusted automatically and notice through information
message.
Caution
• Currently, it is not linked with the speed control function of the speed slide bar.
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 set_velj( 30 )
2 set_accj( 60 )
3
4 Xt = posj( 0 , 0 , 0 , 0 , 0 , 0 )
5 servoj(Xt)
6
7 Xt = posj( 0 , 0 , 0 , 0 , 0 , 0 )
8 target = posx( 90 , 0 , 120 , - 50 , 50 , - 90 )
9 del_t = [ 3 , 0.1 , 3 , - 3 , 3 , - 3 ]
10
11 while 1 :
12 for i in range ( 0 , 6 ):
13 Xt[i] = Xt[i] + del_t[i]
14
15 if del_t[i] > 0 :
16 if Xt[i] > target[i]:
17 Xt[i] = target[i]
18 else :
19 if Xt[i] < target[i]:
20 Xt[i] = target[i]
21
22 servoj(Xt)
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• mwait(time=0)(p. 125)
3.6.2 servol()
Features
The command is the asynchronous motion command, and the next command is executed at the same time the
motion begins. That motion follows the most recent target task position that is continuously delivered, within
maximum velocity, acceleration.
Parameters
Parameter Name Data Type Default Value Description
Note
• Abbreviated parameter names are supported. (v:vel, a:acc, t:time)
• _global_velx is applied if vel is None. (The initial value of _global_velx is 0.0 and can be set by
set_velj.)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accj.)
• After time is set, If reach time can’t be keep because of condition of maximum velocity and
acceleration, the reach time is adjusted automatically and notice through information
message.
Caution
• Currently, it is not linked with the speed control function of the speed slide bar.
• Currently, it is not linked with the DR_VAR_VEL option among the singularity options. When set
with the DR_VAR_VEL option, it is automatically changed to DR_AVOID option and notice
through information message.
• Currently, it is not linked with the force/compliance control function.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 set_velj( 30 )
2 set_accj( 60 )
3 set_velx( 50 )
4 set_accx( 100 )
5
6 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ))
7
8 Xt = posx( 368 , 34.5 , 442.5 , 50.26 , - 180 , 50.26 )
9 servol(Xt,v = [ 100 , 100 ], a = [ 200 , 300 ])
10
11 Xt = posx( 368 , 34.5 , 442.5 , 50.26 , - 180 , 50.26 )
12 target = posx( 368 , 34.5 , 200 , 50.26 , - 180 , 50.26 )
13 del_t = [ 0 , 0 , - 3 , 0 , 3 , 0 ]
14
15 while 1 :
16 for i in range ( 0 , 6 ):
17 Xt[i] = Xt[i] + del_t[i]
18
19 if del_t[i] > 0 :
20 if Xt[i] > target[i]:
21 Xt[i] = target[i]
22 else :
23 if Xt[i] < target[i]:
24 Xt[i] = target[i]
25 servol(Xt,v = [ 100 , 100 ], a = [ 200 , 300 ])
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel1, vel2)(p. 45)
• set_accx(acc1, acc2)(p. 48)
• mwait(time=0)(p. 125)
3.6.3 speedj()
Features
The command is the asynchronous motion command, and the next command is executed at the same time the
motion begins. That motion follows the most recent target joint velocity that is continuously delivered, within
maximum acceleration.
Parameters
Parameter Name Data Type Default Value Description
Note
• Abbreviated parameter names are supported. (a:acc, t:time)
• _global_accj is applied if acc is None. (The initial value of _global_accj is 0.0 and can be set by
set_accj.)
• After time is set, If reach time can’t be keep because of condition of maximum and acceleration,
the reach time is adjusted automatically and notice through information message.
• If you want to stop normally during movement, input vel as [0,0,0,0,0,0] or use the stop
command.
• For safety, if a new speedj command is not transmitted for 0.1 [sec] during movement, an error
message is displayed and it stops.
Caution
• Currently, it is not linked with the speed control function of the speed slide bar.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ), v = 30 , a = 60 )
2
3 v1 = 30
4 go_plus = True
5 while True :
6 q = get_desired_posj()
7 if go_plus:
8 speedj([v1, 5 , 5 , 5 , 5 , 5 ], a = 60 )
9 if q[ 0 ] > 90 :
10 go_plus = False
11 else :
12 speedj([ - v1, - 5 , - 5 , - 5 , - 5 , - 5 ], a = 60 )
13 if q[ 0 ] < - 90 :
14 go_plus = True
Related commands
• posj(J1=0, J2=0, J3=0, J4=0, J5=0, J6=0)(p. 29)
• set_velj(vel)(p. 42)
• set_accj(acc)(p. 43)
• mwait(time=0)(p. 125)
• stop(st_mode)(p. 131)
3.6.4 speedl()
Features
The command is the asynchronous motion command, and the next command is executed at the same time the
motion begins. That motion follows the most recent target task velocity that is continuously delivered, within
maximum acceleration.
Parameters
Parameter Name Data Type Default Value Description
Note
• Abbreviated parameter names are supported. (a:acc, t:time)
• _global_accx is applied if acc is None. (The initial value of _global_accx is 0.0 and can be set by
set_accj.)
• After time is set, If reach time can’t be keep because of condition of maximum and acceleration,
the reach time is adjusted automatically and notice through information message.
• If you want to stop normally during movement, input vel as [0,0,0,0,0,0] or use the stop
command.
• For safety, if a new speedj command is not transmitted for 0.1 [sec] during movement, an error
message is displayed and it stops.
Caution
• Currently, it is not linked with the speed control function of the speed slide bar.
• Currently, it is not linked with the DR_VAR_VEL option among the singularity options. When set
with the DR_VAR_VEL option, it is automatically changed to DR_AVOID option and notice
through information message.
• Currently, it is not linked with the force/compliance control function.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ), v = 30 , a = 60 )
2 x = get_desired_posx()
3
4 v_y = 250
5 v = 5
6 at_max = 500
7 ar_max = 60
8 go_plus = True
9 while True :
10 xd = get_desired_posx()
11 if go_plus:
12 speedl([v, v_y, v, 30 , 0 , 30 ], [at_max, ar_max])
13 if xd[ 1 ] > x[ 1 ] + 200 :
14 go_plus = False
15 else :
16 speedl([ - v, - v_y, - v, - 30 , - 0 , - 30 ],
[at_max, ar_max])
17 if xd[ 1 ] < x[ 1 ] - 200 :
18 go_plus = True
Related commands
• posx(X=0, Y=0, Z=0, A=0, B=0, C=0)(p. 30)
• set_velx(vel)(p. 46)
• set_accx(acc)(p. 49)
• mwait(time=0)(p. 125)
• stop(st_mode)(p. 131)
4.1.1 get_current_posj()
Features
This function returns the current joint angle.
Return
Value Description
Exception
Exception Description
Example
1 q1 = get_current_posj()
Related commands
• get_desired_posj()(p. 162)
4.1.2 get_current_velj()
Features
This function returns the current joint velocity.
Return
Value Description
Exception
Exception Description
Example
1 velj1 = get_current_velj()
Related commands
• get_desired_velj()(p. 163)
4.1.3 get_current_posx(ref)
Features
Returns the pose and solution space of the current task coordinate. The pose is based on the ref coordinate.
Parameters
Parameter Name Data Type Default Value Description
Note
• ref: DR_BASE (base coordinate)/user coordinate (globally declared user coordinate)
• DR_BASE is applied when ref is omitted.
Return
Value Description
Exception
Exception Description
Example
Related commands
• get_desired_posx(ref)(p. 164)
4.1.4 get_current_tool_flange_posx(ref)
Features
Returns the current tool flange pose based on the reference coordinate (ref). The tool flange will return to
tcp=(0,0,0,0,0,0).
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
1 x1 = get_current_tool_flange_posx()
2 #x1 : Flange pose base on the base coordinate(default value)
3 x2 = get_current_tool_flange_posx(DR_BASE)
4 #x2 : Flange pose based on the base coordinate
5 x3 = get_current_tool_flange_posx(DR_WORLD)
6 #x3 : Flange pose based on the world coordinate
4.1.5 get_current_velx(ref)
Features
This function returns the current tool velocity based on the ref coordinate.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
1 velx1 = get_current_velx()
2 # velx1 : velocity based on the base coordinate(default value)
3 velx2 = get_current_velx(DR_BASE)
4 # velx2 (=velx1) : velocity based on the base coordinate
5 velx3 = get_current_velx(DR_WORLD)
6 #velx3 : velocity based on the world coordinate
Related commands
• get_desired_velx(ref)(p. 165)
4.1.6 get_current_rotm(ref)
Features
This function returns the direction and matrix of the current tool based on the ref coordinate.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
1 rotm1 = get_current_rotm(DR_WORLD)
2 #rotm1 : rotation matrix(3x3) based on the world coordinate
4.1.7 get_joint_torque()
Features
This function returns the sensor torque value of the current joint.
Return
Value Description
Exception
Exception Description
Example
1 j_trq1 = get_joint_torque()
Related commands
• get_external_torque()(p. 160)
• get_tool_force(ref)(p. 161)
4.1.8 get_external_torque()
Features
This function returns the torque value generated by the external force on each current joint.
Return
Value Description
Exception
Exception Description
Example
1 trq_ext = get_external_torque()
Related commands
• get_joint_torque()(p. 160)
• get_tool_force(ref)(p. 161)
4.1.9 get_tool_force(ref)
Features
This function returns the external force applied to the current tool based on the ref coordinate. The force and
1)
moment are based on the reference coordinate.
1)
Before V2.8 software version, moment is based on the tool coordinate.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
Related commands
• get_joint_torque()(p. 160)
• get_external_torque()(p. 160)
4.2.1 get_desired_posj()
Features
This function returns the current target joint angle. It cannot be used in the movel, movec, movesx, moveb,
move_spiral, or move_periodic command.
Return
Value Description
Exception
Exception Description
Example
1 jp1 = get_desired_posj()
Related commands
• get_current_posj()(p. 154)
4.2.2 get_desired_velj()
Features
This function returns the current target joint velocity. It cannot be used in the movel, movec, movesx, moveb,
move_spiral, or move_periodic command.
Return
Value Description
Exception
Exception Description
Example
1 velj1 = get_desired_velj()
Related commands
• get_current_velj()(p. 154)
4.2.3 get_desired_posx(ref)
Features
This function returns the target pose of the current tool. The pose is based on the ref coordinate.
Parameters
Parameter Name Data Type Default Value Description
Note
• ref: DR_BASE (base coordinate)/user coordinate (globally declared user coordinate)
• DR_BASE is applied when ref is omitted.
Return
Value Description
Exception
Exception Description
Example
Related commands
• get_desired_posx(ref)(p. 164)
4.2.4 get_desired_velx(ref)
Features
This function returns the target velocity of the current tool based on the ref coordinate. It cannot be used in the
movej, movejx, or movesj command.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
1 vel_x1 = get_desired_velx()
2 #vel_x1 : desired velocity of the tool based on the base
coordinate(default value)
3 vel_x2 = get_desired_velx(DR_BASE)
Related commands
• get_current_velx(ref)(p. 158)
4.3.1 get_control_mode()
Features
This function returns the current control mode.
Return
Value Description
Exception
Exception Description
Example
1 mode = get_control_mode()
4.3.2 get_control_space()
Features
This function returns the current control space.
Return
Value Description
Exception
Exception Description
Example
1 x1 = get_control_space()
4.3.3 get_current_solution_space()
Features
This function returns the current solution space value.
Return
Value Description
Exception
Exception Description
Example
1 sol = get_current_solution_space()
Related commands
• get_solution_space(pos)(p. 168)
4.3.4 get_solution_space(pos)
Features
This function obtains the solution space value for the entered pos(posj).
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
1 q1 = posj( 0 , 0 , 0 , 0 , 0 , 0 )
2 sol1 = get_solution_space(q1)
3 sol2 = get_solution_space([ 10 , 20 , 30 , 40 , 50 , 60 ])
Related commands
• get_current_solution_space()(p. 167)
Features
This function returns the orientation error value between the arbitrary poses xd and xc of the axis.
Parameters
Parameter Name Data Type Default Value Description
xd posx - posx or
position list
list (float[6])
xc posx - posx or
position list
list (float[6])
Return
Value Description
Exception
Exception Description
Example
1 xd = posx( 0 , 0 , 0 , 0 , 0 , 0 )
2 xc = posx( 10 , 20 , 30 , 40 , 50 , 60 )
3 diff = get_orientation_error(xd, xc, DR_AXIS_X)
Related commands
• get_current_rotm(ref)(p. 159)
5.1.1 get_workpiece_weight()
Features
This function measures and returns the weight of the workpiece.
Return
Value Description
Exception
Exception Description
Example
1 weight = get_workpiece_weight()
Related commands
• reset_workpiece_weight()(p. 172)
5.1.2 reset_workpiece_weight()
Features
This function initializes the weight data of the material to initialize the algorithm before measuring the weight
of the material.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 reset_workpiece_weight()
Related commands
• get_workpiece_weight()(p. 171)
Features
In addition to the tool weight/center of gravity at the end of the robot, set the weight/center of gravity of the
work piece and other information. The weight and center of gravity of the entire payload is reflected by
combining the set tool weight/center of gravity and the work piece's weight/center of gravity. It can be used in
applications where the type of workpiece is frequently varied or the weight needs to be dynamically changed.
Caution
• Workpiece weight change is allowed only when both Collision Detection and TCP SLF Violation
check are mute or deactivated during Auto Mode.
• In the current version, Collision Detection considers the function mute when Collision
Sensitivity is overridden to 0 and TCP SLF considers the function mute when the TCP SLF Limit
is overridden to the maximum. This override can be set using Collision Sensitivity Reduction
Zone and Custom Zone.
• Otherwise, trigger an SS1 protective stop unless the workpiece weight is set to zero.
• If the robot stops due to an error and needs to be manually restored, place the robot in the
desired position in the Recovery Mode and unload the workpiece through Servo On and I/O
operation while the corresponding zones are activated in Auto Mode.
• When changing the set tool weight, the workpiece weight is initialized to 0.
Parameters
Parameter Name Data Type Default Value Description
Note
• Workpiece weight cannot exceed the maximum payload weight (margin 10%) for each model.
The same is true for the weight of total payload.
• The length (x, y, z) of the center of gravity of the workpiece cannot exceed 1000 mm. The same
is true for the length of the center of gravity of the entire payload.
• It is possible to change the weight of the workpiece after the set time through start_time.
• Transition_time allows you to gradually change the weight of the workpiece through
transition_time.
• When using the set_tool and set_workpiece_weight functions in succession, you must use the
wait(transition_time) function as much as transition_time between them. Otherwise, there may
be errors in the weight change.
Return
Value Description
0 Success
Exception
Exception Description
Example
Related Commands
• set_tool(name, start_time, transition_time)(p. 176)
5.1.4 set_tool_shape(name)
Features
This function activates the tool shape information of the entered name among the tool shape information
registered in the Teach Pendant.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
Related commands
• set_tcp(name)(p. 51)
Features
Teach Pendant>Workcell Manager>Activate the Tool Weight workcell item with the entered name from among
the Tool Weight workcell items registered in the robot.
Tool weight can be changed after setting time(start_time) and during setting time(transition_time).
Parameters
Parameter Name Data Type Default Value Description
Note
• When using the set_tool and set_workpiece_weight functions in succession, you must use the
wait(transition_time) function as much as transition_time between them. Otherwise, there may
be errors in the weight change.
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• set_tcp(name)(p. 51)
5.2.1 set_singularity_handling(mode)
Features
Allows the user to select a response policy when a path deviation occurs due to a singularity in task motion. The
mode can be set as follows
The default setting is automatic avoidance mode, which reduces instability caused by singularity, but reduces
path tracking accuracy. In case of path first setting, if there is possibility of instability due to singularity, a
warning message is output after deceleration and then the corresponding task is terminated. In case of variable
velocity mode setting, TCP velocity would be changed in singular region to reduce instability and maintain path
tracking accuracy.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• amovel()(p. 98)
• amovec()(p. 104)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
5.2.2 set_singular_handling_force(mode)
Features
The program is terminated by default through error processing when compliance or force control are used
within the singularity area. It is possible to ignore error processing within the singularity area by changing the
Mode setting.
Caution
• Compliance and force control within the singularity area are not recommended. The force
estimate in a particular direction can be inaccurate.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
1 set_ref_coord(DR_BASE)
2 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 movej(P0,vel = 30 ,acc = 60 )
4
5 #Ignoring error when entering singularity
6 set_singular_handling_force(DR_SINGULARITY_IGNORE)
7
8 task_compliance_ctrl()
9 set_stiffnessx([ 500 , 500 , 500 , 100 , 100 , 100 ], time = 0
.5 )
10 fd = [ 0 , 0 , 30 , 0 , 0 , 0 ]
11 fctrl_dir = [ 0 , 0 , 1 , 0 , 0 , 0 ]
Related Commands
• task_compliance_ctrl(stx, time)(p. 186)
• set_stiffnessx(stx, time)(p. 187)
• set_desired_force(fd, dir, time, mod)(p. 189)
• release_compliance_ctrl()(p. 185)
5.2.3 set_palletizing_mode(mode)
Features
During palletizing application motion, path tracking and velocity can be maintained around the wrist singularity
point using this function. there is no instability in wrist singular region when B in motion command is set to
0deg or 180deg.
Caution
• Setting tool orientation, B must be set to 0deg or 180deg when setting tcp information. If this
condition don’t be satisfied, Error is occurred when using this function.
• Normally velocity don’t be changed in this mode. But if current joint velocity exceed allowable
max joint velocity, velocity can be reduced automatically.
• In case of H seriese model, Rx, Ry moment control is restricted and external moment value of
each Rx, Ry direction is 0.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Value Description
Exception
Exception Description
Example
1 set_singularity_handling(DR_VAR_VEL)
2
3 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ),vel = 30 ,acc = 60 )
4
5 set_palletizing_mode(DR_ON)
6 movel(posx( 559 , 34.5 , - 400 , 45 , 180 , 45 ),vel = 500 ,acc =
1000 )
7 set_palletizing_mode(DR_OFF)
Related Commands
• set_singularity_handling(mode)(p. 177)
5.2.4 set_motion_end(mode)
Features
This command sets whether to operate the function to check the stop status of the robot after motion is
completed. Stop time between consecutive motions decreases if it set to deactivate mode (DR_CHECK_OFF)
and can be used for purposes of decreasing the overall work time. It is recommended to set it to DR_CHECK_ON
when the tool is heavy and an accurate stop position is required for motion commands driven with high
acceleration.
Caution
• It is not possible to change the mode, during the blending movements between consecutive
motions without stopping.
• In the case of continuous motion that does not require a stop state, using motion blending is
more effective in reducing tact time.
• After the program is finished, it is initialized to the default value again
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
1 set_motion_end(DR_CHECK_OFF)
2
3 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ) ,vel = 30 ,acc = 60 ,mod =
DR_MV_MOD_ABS )
4 while 1 :
5 movej(posj( 0 , 0 , 10 , 0 , 10 , 0 ) ,vel = 30 ,acc = 60 ,,mo
d = DR_MV_MOD_REL )
6 movej(posj( 0 , 0 , - 10 , 0 , - 10 , 0 ) ,vel = 30 ,acc = 60 ,
,mod = DR_MV_MOD_REL )
Related Commands
• movel()(p. 59)
• movec()(p. 68)
• movesx()(p. 77)
• moveb()(p. 81)
• move_spiral()(p. 85)
• amovel()(p. 98)
• amovec()(p. 104)
• amovesx()(p. 111)
• amoveb()(p. 114)
• amove_spiral()(p. 118)
6.1.1 release_compliance_ctrl()
Features
This function terminates compliance control and begins position control at the current position.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3 task_compliance_ctrl()
4 set_stiffnessx([ 100 , 100 , 300 , 100 , 100 , 100 ])
5 release_compliance_ctrl()
Related commands
• task_compliance_ctrl(stx, time)(p. 186)
• set_stiffnessx(stx, time)(p. 187)
Features
This function begins task compliance control based on the preset reference coordinate system.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(P0)
3 task_compliance_ctrl() # Begins with the default stiffness
4 set_stiffnessx([ 500 , 500 , 500 , 100 , 100 , 100 ], time = 0
.5 )
5 # Switches to the user-defined stiffness for 0.5 sec.
6 release_compliance_ctrl()
7
8 task_compliance_ctrl([ 500 , 500 , 500 , 100 , 100 , 100 ])
9 # Begins with the user-defined stiffness.
10 release_compliance_ctrl()
Related commands
• set_stiffnessx(stx, time)(p. 187)
• release_compliance_ctrl()(p. 185)
Features
This function sets the stiffness value based on the global coordinate (refer to set_ref_coord()). The stiffness
linearly changes for a given time from the current stiffness or default value to STX.The user-defined ranges of
the translational stiffness and rotational stiffness are 0-20000N/m and 0-400Nm/rad, respectively.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
Related commands
• task_compliance_ctrl(stx, time)(p. 186)
• release_compliance_ctrl()(p. 185)
Features
This function define the s target force, direction, translation time, and mode for force control based on the
global coordinate.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Note
• The value of external force refers to the sensor measurement at terminating the force control
(control mode transition to compliance control) by the command release_force().
Therefore, the variation in external force can occur if the option mod=DR_FC_MOD_REL is
applied.
• Tool weight and external force value refer to the sensor measurement regardless of the setting
for ‘mod’
Caution
To retain the accuracy in force control, it is recommended to start force control with setting
mod=DR_FC_MOD_REL near the contact point.
Example
1 # Example # 1
2 # Executed in the global coordinate(tool coordinate)
3 # Zero force control in the z-axis direction of the tool, moment
control in the z-axis direction of the tool, and compliance
control in the other directions
4 # Force control with the relative value to the sensor measurement
at starting the force control
5
6 set_ref_coord(DR_TOOL)
7 x0 = posx( 0 , 0 , 90 , 0 , 90 , 0 )
8 movej(x0)
9 task_compliance_ctrl(stx = [ 500 , 500 , 500 , 100 , 100 ,
100 ])
10 fd = [ 0 , 0 , 0 , 0 , 0 , 10 ]
11 fctrl_dir = [ 0 , 0 , 1 , 0 , 0 , 1 ]
12 set_desired_force(fd, dir = fctrl_dir, mod = DR_FC_MOD_REL)
13
14 # Example #2
15 # 1. Move to initial posj: [J1, J2, J3, J4, J5, J6] = [0, 0, 90,
0, 90, 0]
16 # 2. Approach to the position to start force control: move -100mm
along Base-z direction
17 # 3. Start force control : apply -20N force along Base–z direction
18 # 4. Force & compliance control after detecting external force :
while maintaining -20N force along Base-z direction (force
control), move 200mm along Base-y direction.
19 # 5. Retract 150mm in Base-z direction and move to initial posj
20
21 # 1. Move to initial posj
22 q0 = posj( 0.0 , 0.0 , 90.0 , 0.0 , 90.0 , 0.0 )
23 set_velj( 30.0 )
24 set_accj( 60.0 )
25 movej(q0)
26
27 # 2. Approach to the position to start force control
28 set_velx( 75.0 )
29 set_accx( 100.0 )
30 delta_approach = [ 0.0 , 0.0 , - 100.0 , 0.0 , 0.0 , 0.0 ]
31 movel(delta_approach, mod = DR_MV_MOD_REL)
32
33 # 3. Start force control (apply -20N force along Base–z direction)
34 k_d = [ 3000.0 , 3000.0 , 3000.0 , 200.0 , 200.0 , 200.0 ]
35 task_compliance_ctrl(k_d)
36 force_desired = 20.0
37 f_d = [ 0.0 , 0.0 , - force_desired, 0.0 , 0.0 , 0.0 ]
38 f_dir = [ 0 , 0 , 1 , 0 , 0 , 0 ]
39 set_desired_force(f_d, f_dir)
40
41 # 4. Force & compliance control after detecting external force
42 force_check = 20.0
43 force_condition = check_force_condition(DR_AXIS_Z, max = force_
check)
44 while (force_condition):
45 force_condition = check_force_condition(DR_AXIS_Z, max = fo
rce_check)
46 if force_condition = = 0 :
47 break
48 delta_motion = [ 0.0 , 200.0 , 0.0 , 0.0 , 0.0 , 0.0 ]
49 movel(delta_motion, mod = DR_MV_MOD_REL)
50
51 # 5. Retract 150mm in Base-z direction and move to initial posj
52 release_force()
53 wait( 0.5 )
54 delta_retract = [ 0.0 , 0.0 , 150.0 , 0.0 , 0.0 , 0.0 ]
55 release_compliance_ctrl()
56 movel(delta_retract, mod = DR_MV_MOD_REL)
57 movej(q0)
Related commands
• release_force(time=0)(p. 192)
• task_compliance_ctrl(stx, time)(p. 186)
• set_stiffnessx(stx, time)(p. 187)
• release_compliance_ctrl()(p. 185)
6.1.5 release_force(time=0)
Features
This function reduces the force control target value to 0 through the time value and returns the task space to
adaptive control.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
1 j0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 x0 = posx( 0 , 0 , 0 , 0 , 0 , 0 )
3 x1 = posx( 0 , 500 , 700 , 0 , 180 , 0 )
4 x2 = posx( 300 , 100 , 700 , 0 , 180 , 0 )
5 x3 = posx( 300 , 100 , 500 , 0 , 180 , 0 )
6 set_velx( 100 , 20 )
7 set_accx( 100 , 20 )
8 movej(j0, vel = 10 , acc = 10 )
9 movel(x2)
10 task_compliance_ctrl(stx = [ 500 , 500 , 500 , 100 , 100 ,
100 ])
11 fd = [ 0 , 0 , 0 , 0 , 0 , 10 ]
12 fctrl_dir = [ 0 , 0 , 1 , 0 , 0 , 1 ]
13 set_desired_force(fd, dir = fctrl_dir, time = 1.0 )
14 movel(x3, v = 10 )
15 release_force( 0.5 )
16 release_compliance_ctrl()
Related commands
• set_desired_force(fd, dir, time, mod)(p. 189)
• task_compliance_ctrl(stx, time)(p. 186)
• set_stiffnessx(stx, time)(p. 187)
• release_compliance_ctrl()(p. 185)
6.1.6 get_force_control_state()
Features
It monitors the state of compliance and force control.
Return
[singularity, mode, stx, fd, ref]
Value Description
Value Description
Exception
Exception Description
Example
1 set_ref_coord(DR_BASE)
2 P0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
3 movej(P0,vel = 30 ,acc = 60 )
4
5 task_compliance_ctrl()
6 set_stiffnessx([ 500 , 500 , 500 , 100 , 100 , 100 ], time = 0
.5 )
7
8 while True :
9 [singularity, mod, stx, fd, ref] = get_force_control_state()
10 tp_log( "s={0}, m={1}, k={2}, f={3}, r={4}" . format (singularity,
mod,stx,fd,ref))
11 wait( 0.5 )
12 release_compliance_ctrl()
Related Commands
• set_singular_handling_force(mode)(p. 179)
• task_compliance_ctrl(stx, time)(p. 186)
• set_stiffnessx(stx, time)(p. 187)
• set_desired_force(fd, dir, time, mod)(p. 189)
• release_compliance_ctrl()(p. 185)
Features
This function matches the normal vector of the plane consists of points(x1, x2, x3) based on the ref
coordinate(refer to get_normal(x1, x2, x3)) and the designated axis of the tool frame. The current position is
maintained as the TCP position of the robot.
Parameters
Parameter Name Data Type Default Value Description
x1 posx - posx or
position list
list (float[6])
x2 posx - posx or
position list
list (float[6])
x3 posx - posx or
position list
list (float[6])
Return
Value Description
0 Success
Exception
Exception Description
Example
1 x0 = posx( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(x0)
3 x1 = posx( 0 , 500 , 700 , 30 , 0 , 90 )
4 x2 = posx( 500 , 0 , 700 , 0 , 0 , 45 )
5 x3 = posx( 300 , 100 , 500 , 45 , 0 , 45 )
6 parallel_axis(x1, x2, x3, DR_AXIS_X, DR_WORLD)
7 # match the tool x axis and the normal vector of the plane
consists of points(x1,x2,x3) # based on the world coordinate
Related commands
• get_normal(x1, x2, x3)(p. 296)
• parallel_axis(vect, axis, ref)(p. 197)
Features
This function matches the given vect direction based on the ref coordinate and the designated axis of the tool
frame. The current position is maintained as the TCP position of the robot.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 x0 = posx( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(x0)
3 parallel_axis([ 1000 , 700 , 300 ], DR_AXIS_X, DR_WORLD)
4 # match the tool x axis and the vector([1000,700,300]) based on
the world coordinate
Related commands
• movej()(p. 54)
• parallel_axis(x1, x2, x3, axis, ref)(p. 195)
• align_axis(vect, pos, axis, ref)(p. 200)
• align_axis(x1, x2, x3, pos, axis, ref)(p. 198)
Features
This function matches the normal vector of the plane consists of points(x1, x2, x3) based on the ref
coordinate(refer to get_normal(x1, x2, x3)) and the designated axis of the tool frame. The robot TCP moves to
the pos position.
Parameters
Parameter Name Data Type Default Value Description
x1 posx -
posx or
position list
list (float[6])
x2 posx -
posx or
position list
list (float[6])
x3 posx -
posx or
position list
list (float[6])
pos posx -
posx or
position list
list (float[6])
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 p0 = posj( 0 , 0 , 45 , 0 , 90 , 0 )
2 movej(p0, v = 30 , a = 30 )
3
4 x1 = posx( 0 , 500 , 700 , 30 , 0 , 0 )
5 x2 = posx( 500 , 0 , 700 , 0 , 0 , 0 )
6 x3 = posx( 300 , 100 , 500 , 0 , 0 , 0 )
7 pos = posx( 400 , 400 , 500 , 0 , 0 , 0 )
8 align_axis(x1, x2, x3, pos, DR_AXIS_X, DR_BASE)
9 # match the tool x axis and the normal vector in the plane
consists of points(x1, x2,
10 # x3) based on the base coordinate
Related commands
• movej()(p. 54)
• get_normal(x1, x2, x3)(p. 296)
• align_axis(vect, pos, axis, ref)(p. 200)
• parallel_axis(vect, axis, ref)(p. 197)
• parallel_axis(x1, x2, x3, axis, ref)(p. 195)
Features
This function matches the given vect direction based on the ref coordinate and the designated axis of the tool
frame. The robot TCP moves to the pos position.
Parameters
Parameter Name Data Type Default Value Description
list (float[6])
Return
Value Description
0 Success
Exception
Exception Description
Example
1 p0 = posj( 0 , 0 , 45 , 0 , 90 , 0 )
2 movej(p0, v = 30 , a = 30 )
3
4 vect = [ 10 , 20 , 30 ]
5 pos = posx( 100 , 500 , 700 , 45 , 0 , 0 )
6 align_axis(vect, pos, DR_AXIS_X)
Related commands
• movej()(p. 54)
• align_axis(x1, x2, x3, pos, axis, ref)(p. 198)
Features
This function monitors the tightening torque of the tool and returns True if the set torque (m) is reached within
the given time and False if the given time has passed.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
1 p0 = posj( 0 , 0 , 90 , 0 , 90 , 0 )
2 movej(p0, v = 30 , a = 30 )
3
4 task_compliance_ctrl()
5 xd = posx( 559 , 34.5 , 651.5 , 0 , 180.0 , 60 )
6 amovel(xd, vel = 50 , acc = 50 ) # Bolt tightening motion
7
8 res = is_done_bolt_tightening( 10 , 5 , DR_AXIS_Z)
9 # Returns True if the tightening torque of 10Nm is reached
within 5 seconds.
10 # Returns False otherwise.
11 if res = = True :
12 # some action comes here for the case that bolt tightening is
done
13 x = 1
14 else :
15 # some action comes here for the case that it fails
16 x = 2
Related commands
• movej()(p. 54)
• amovel()(p. 98)
Features
This function returns a new user cartesian coordinate system by using up to 4 input poses ([x1]~[x4]), input
mode [mod] and the reference coordinate system [ref]. The input mode is only valid when the number of input
robot poses is 2.
In the case that the number of input poses is 1, the coordinate system is calculated using the position and
orientation of x1.
In the case that the number of input poses is 2 and the input mode is 0, X-axis is defined by the direction from x1
to x2, and Z-axis is defined by the projection of the current Tool-Z direction onto the plane orthogonal to the x-
axis. The origin is the position of x1.
In the case that the number of input poses is 2 and the input mode is 1, X-axis is defined by the direction from x1
to x2, and Z-axis is defined by the projection of the z direction of x1 onto the plane orthogonal to the X-axis. The
origin is the position of x1.
In the case that the number of input poses is 3, X-axis is defined by the direction from x1 to x2. If a vector v is the
direction from x1 to x3, Z-axis is defined by the cross product of X-axis and v (X-axis cross v). The origin is the
position of x1.
In the case that the number of input poses is 4, the definition of axes is identical to the case that the number of
input poses is 3, but the origin is the position of x4
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Exception Description
Example
Related commands
• set_user_cart_coord(pos, ref)(p. 205)
• set_user_cart_coord(u1, v1, pos, ref)(p. 208)
• set_user_cart_coord(x1, x2, x3, pos, ref)(p. 207)
Features
This function set a new user cartesian coordinate system using input pose [pos] and reference coordinate
system[ref]. Up to 20 user coordinate systems can be set including the coordinate systems set within Workcell
Item. Since the coordinate system set by this function is removed when the program is terminated, setting new
coordinate systems within Workcell Item is recommended for maintaining the coordinate information.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
1 pos1 = posx( 10 , 20 , 30 , 0 , 0 , 0 )
2 pos2 = posx( 30 , 50 , 70 , 45 , 180 , 45 )
3 user_id1 = set_user_cart_coord(pos1, ref = DR_BASE)
4 user_id2 = set_user_cart_coord(pos2, ref = DR_WORLD)
Related commands
• set_ref_coord(coord)(p. 52)
Features
This function sets a new user cartesian coordinate system using [x1], [x2], and [x3] based on ref coordinate
system[ref]. Creates a user coordinate system with ux, uy, and uz as the vector for each axis and origin position
is the position of [pos] based on [ref]. 1)ux is defined as the unit vector of x1x2 , uz is defined as the unit vector
defined by the cross product of x1x2 and x1x3 (x1x2 cross x1x3). uy is can be determined by right hand rule (uz
cross ux). Up to 20 user coordinate systems can be set including the coordinate systems set within Workcell
Item. Since the coordinate system set by this function is removed when the program is terminated, setting new
coordinate systems within Workcell Item is recommended for maintaining the coordinate information.
1)
In software versions lower than M2.0.2, ux is used as the unit vector of x2x1
Parameters
Parameter Name Data Type Default Value Description
x1 Posx - posx or
position list
list (float[6])
x2 Posx - posx or
position list
list (float[6])
x3 Posx - posx or
position list
list (float[6])
Return
Value Description
Exception
Exception Description
Example
Related commands
• set_ref_coord(coord)(p. 52)
Features
This function sets a new user cartesian coordinate system using [u1] and [v1] based on [ref] coordinate system.
The origin position the position of [pos] based on the [ref] coordinate while the direction of x-axis and y-axis
bases are given in the vectors u1 and v1, respectively. Other directions are determined by u1 cross v1. If u1 and
v1 are not orthogonal, v1’, that is perpendicular to u1 on the surface spanned by u1 and v1, is set as the vector
in the y-axis direction. Up to 20 user coordinate systems can be set including the coordinate systems set within
Workcell Item. Since the coordinate system set by this function is removed when the program is terminated,
setting new coordinate systems within Workcell Item is recommended for maintaining the coordinate
information.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 u1 = [ 1 , 1 , 0 ]
2 v1 = [ - 1 , 1 , 0 ]
3 pos = posx( 10 , 20 , 30 , 0 , 0 , 0 )
4 user_tc1 = set_user_cart_coord(u1, v1, pos)
5 user_tc2 = set_user_cart_coord(u1, v1, pos, ref = DR_WORLD)
Related commands
• set_ref_coord(coord)(p. 52)
Features
This function changes the pose and reference coordinate system of the requested user coordinate system [id]
with the [pos] and [ref], respectively.
Parameters
Parameter Name Data Type Default Value Description
id int - coordinate ID
Return
Value Description
Exception
Exception Description
Exception
1 pose_user1 = posx( 30 , 40 , 50 , 0 , 0 , 0 )
2 id_user = set_user_cart_coord(pose_user1, ref = DR_BASE)
3 pose_user2 = posx( 100 , 150 , 200 , 45 , 180 , 0 )
4 overwrite_user_cart_coord(id_user, pose_user2, ref = DR_BASE)
Related commands
• set_user_cart_coord(pos, ref)(p. 205)
• set_user_cart_coord(u1, v1, pos, ref)(p. 208)
• set_user_cart_coord(x1, x2, x3, pos, ref)(p. 207)
6.2.11 get_user_cart_coord(id)
Features
This function returns the pose and reference coordinate system of the requested user coordinate system [id].
Parameters
Parameter Name Data Type Default Value Description
id int - coordinate ID
Return
Value Description
Exception
Exception Description
Example
1 pose_user1 = posx( 10 , 20 , 30 , 0 , 0 , 0 )
2 id_user = set_user_cart_coord(pose_user1, ref = DR_BASE)
3 pose, ref = get_user_cart_coord(id_user)
Related commands
• set_user_cart_coord(pos, ref)(p. 205)
• set_user_cart_coord(u1, v1, pos, ref)(p. 208)
• set_user_cart_coord(x1, x2, x3, pos, ref)(p. 207)
Features
This function checks the status of the given position. This condition can be repeated with the while or if
statement. Axis and pos of input paramets are based on the ref coordinate.
Parameters
Parameter Name Data Type Default Value Description
Note
• The absolution position is used if the mod is DR_MV_MOD_ABS.
Return
Value Description
Exception
Exception Description
Example
Related commands
• check_force_condition(axis, min, max, ref)(p. 215)
• check_orientation_condition(axis, min, max, ref, mod)(p. 217)
• check_orientation_condition(axis, min, max, ref, mod, pos)(p. 219)
• set_ref_coord(coord)(p. 52)
Features
This function checks the status of the given force. It disregards the force direction and only compares the sizes.
This condition can be repeated with the while or if statement. Measuring the force and 1)moment, axis is based
on the ref coordinate.
1)
Before V2.8 software version, measuring the moment, axis is based on the tool coordinate.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
Related commands
• check_position_condition(axis, min, max, ref, mod, pos)(p. 213)
• check_orientation_condition(axis, min, max, ref, mod)(p. 217)
• check_orientation_condition(axis, min, max, ref, mod, pos)(p. 219)
• set_ref_coord(coord)(p. 52)
Features
This function checks the difference between the current pose and the specified pose of the robot end effector. It
returns the difference between the current pose and the specified pose in rad with the algorithm that
transforms it to a rotation matrix using the "AngleAxis" technique. It returns True if the difference is positive (+)
and False if the difference is negative (-). It is used to check if the difference between the current pose and the
rotating angle range is + or -. For example, the function can use the direct teaching position to check if the
difference from the current position is + or - and then create the condition for the orientation limit. This
condition can be repeated with the while or if statement
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
Related commands
• check_position_condition(axis, min, max, ref, mod, pos)(p. 213)
• check_force_condition(axis, min, max, ref)(p. 215)
• check_orientation_condition(axis, min, max, ref, mod)(p. 217)
• check_orientation_condition(axis, min, max, ref, mod, pos)(p. 219)
• set_ref_coord(coord)(p. 52)
Features
This function checks the difference between the current pose and the rotating angle range of the robot end
effector. It returns the difference (in rad) between the current pose and the rotating angle range with the
algorithm that transforms it to a rotation matrix using the "AngleAxis" technique. It returns True if the difference
is positive (+) and False if the difference is negative (-). It is used to check if the difference between the current
pose and the rotating angle range is + or -. For example, the function can be used to set the rotating angle range
to min and max at any reference position, and then determine the orientation limit by checking if the difference
from the current position is + or -. This condition can be repeated with the while or if statement
Note
Range of rotating angle: Refers to the relative angle range (min, max) basded on the set axis from the
given position. The reference coordinate is defined according to the given position based on ref.
Parameters
Parameter Name Data Type Default Value Description
list (float[6])
Return
Value Description
Exception
Exception Description
Example
Related commands
• check_position_condition(axis, min, max, ref, mod, pos)(p. 213)
• check_force_condition(axis, min, max, ref)(p. 215)
Features
This function transforms given task position expressed in reference coordinate, ‘ref_in’ to task position
expressed in reference coordinate, ‘ref_out’. It returns transformed task position. It supports calculation of
coordinate transformation for the following cases.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
pos posx
Exception
Exception Description
Example
Related commands
• set_user_cart_coord(pos, ref)(p. 205)
• set_user_cart_coord(u1, v1, pos, ref)(p. 208)
• set_user_cart_coord(x1, x2, x3, pos, ref)(p. 207)
• get_current_posx(ref)(p. 155)
• get_desired_posx(ref)(p. 164)
• set_ref_coord(coord)(p. 52)
7 System Commands
7.1 IO Related
Features
This function sends a signal at the digital contact point of the controller. A value saved in the digital output
register is output as a digital signal.
Parameters
Parameter Name Data Type Default Value Description
Note
If val is omitted, positive numbers become ON and negative numbers become OFF depending on the
sign (+/-) of the index.
Return
Value Description
0 Success
Value Description
Exception
Exception Description
Example
7.1.2 set_digital_outputs(bit_list)
Features
This function sends a signal to multiple digital output contact points of the controller.
The digital signals of the contact points defined in bit_list are output at one.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 set_digital_outputs(bit_list = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ])
# Contact number 1-8 ON
2 set_digital_outputs([ - 1 , - 2 , - 3 , - 4 , - 5 , - 6 , - 7 , -
8 ]) # Contact number 1-8 OFF
3 set_digital_outputs([ 1 , - 2 , 3 ]) # Contact no.
1 ON, no. 2 OFF, and no. 3 ON
4 set_digital_outputs([ 4 , - 9 , - 12 ]) # Contact no.
4 ON, no. 9 OFF, and no. 12 OFF
Features
This function sends multiple signals at once from the digital output start contact point (bit_start) to the end
contact point (bit_end) of the controller.
Parameters
Parameter Name Data Type Default Description
Value
Note
• Bit_end must be a larger number than bit_start.
• Val is the value of the combination of bits where bit_start =LSB and bit_end=MSB.
Ex) bit_start =1, bit_end=4, val=0b1010 # No. 4=ON, no. 3=OFF, no. 2=ON, and no. 1=OFF
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function sends a signal at the digital contact point of the controller. A value saved in the digital output
register is output as a digital signal. After sending out the specified signal for the set time, the next signal is sent
out.
Parameters
Parameter Name Data Type Default Description
Value
Note
If val is omitted, the positive number becomes ON and the negative number OFF according to the sign of
the argument index.
Return
Value Description
0 Success
Exception
Exception Description
Example
7.1.5 get_digital_input(index)
Features
This function reads the signals from digital contact points of the controller and reads the digital input contact
value.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
1 ON
0 OFF
Exception
Exception Description
Example
7.1.6 get_digital_inputs(bit_list)
Features
This function reads the signals from multiple digital contact points of the controller. The digital signals of the
contact points defined in bit_list are input at one.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 # input contacts: No. 1=OFF, No. 2=OFF, No. 3=ON, and No. 4=ON
2 res = get_digital_inputs(bit_list = [ 1 , 2 , 3 , 4 ])
3 #res expected value = 0b1100 (binary number), 12 (decimal number),
or 0x0C (hexadecimal number)
4
5 # input contacts: No. 5=ON, No. 6=ON, No. 7=OFF, and No. 8=ON
6 res = get_digital_inputs([ 5 , 6 , 7 , 8 ])
7 #res expected value = 0b1011 (binary number), 11 (decimal number),
or 0x0B (hexadecimal number)
Features
This function reads multiple signals at once from the digital input start contact point (start_index) to the end
contact point (end_index) of the controller.
Parameters
Parameter Name Data Type Default Description
Value
Note
Bit_end must be a larger number than bit_start.
Return
Value Description
Exception
Exception Description
Example
1 # input contacts: No. 1=OFF, No. 2=OFF, No. 3=ON, and No. 4=ON
2 res = get_digital_inputs(bit_start = 1 , bit_end = 4 )
3 #res expected value = 0b1100 (binary number), 12 (decimal number),
or 0x0C (hexadecimal number)
Features
This function waits until the signal value of the digital input register of the controller becomes val (ON or OFF).
The waiting time can be changed with a timeout setting. The waiting time ends, and the result is returned if the
waiting time has passed. This function waits indefinitely if the timeout is not set.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
-1 Failed (time-out)
Exception
Exception Description
Example
Features
This function sends the signal of the robot tool from the digital contact point.
Parameters
Parameter Name Data Type Default Description
Value
Note
If val is omitted, positive numbers become ON and negative numbers become OFF depending on the
sign (+/-) of the index.
Return
Value Description
0 Success
Exception
Exception Description
Example
7.1.10 set_tool_digital_outputs(bit_list)
Features
This function sends the signal of the robot tool from the digital contact point. The digital signals of the contact
points defined in bit_list are output at one.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 set_tool_digital_outputs(bit_list = [ 1 , 2 , 3 , 4 , 5 , 6 ])
# Sets the contacts 1-6 ON
2 set_tool_digital_outputs([ - 1 , - 2 , - 3 , - 4 , - 5 , - 6 ])
# Sets the contacts 1-6 OFF
3 set_digital_outputs([ 1 , - 2 , 3 ]) # Contact no. 1
ON, no. 2 OFF, and no. 3 ON
Features
This function sends the signal of the robot tool from the digital contact point. The multiple signals from the first
contact point (bit_start) to the last contact point (bit_end) are output at one.
Parameters
Parameter Data Default Description
Name Type Value
Note
• Bit_end must be a larger number than bit_start.
• Val is the value of the combination of bits where bit_start =LSB and bit_end=MSB.
Ex) bit_start =1, bit_end=4, val=0b1010 # No. 4=ON, no. 3=OFF, no. 2=ON, and no. 1=OFF
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
Features
This function sends the signal of the robot tool from the digital contact point. After sending out the specified
signal for the set time, the next signal is sent out.
Parameters
Parameter Name Data Type Default Description
Value
Note
If val is omitted, the positive number becomes ON and the negative number OFF according to the sign of
the argument index.
Return
Value Description
0 Success
Exception
Exception Description
Example
7.1.13 get_tool_digital_input(index)
Features
This function reads the signal of the robot tool from the digital contact point.
Parameters
Parameter Name Data Type Default Description
Value
index int - I/O contact number (1-6) mounted on the robot tool
Return
Value Description
1 ON
Value Description
0 OFF
Exception
Exception Description
Example
7.1.14 get_tool_digital_inputs(bit_list)
Features
This function reads the signal of the robot tool from the digital contact point.
The digital signals of the contact points defined in bit_list are input at one.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
Features
This function reads the signal of the robot tool from the digital contact point. The multiple signals from the first
contact point (start_index) to the last contact point (end_index) are input at one.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This function waits until the digital input signal value of the robot tool becomes val (ON or OFF). The waiting
time can be changed with a timeout setting. The waiting time ends, and the result is returned if the waiting time
has passed. This function waits indefinitely if the timeout is not set.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
-1 Failed (time-out)
Exception
Exception Description
Example
Features
This function sets the channel mode of the controller analog output.
Parameters
Parameter Name Data Type Defau Description
lt
Value
ch int - • 1 : channel 1
• 2 : channel 2
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
Features
This function sets the channel mode of the controller analog input.
Parameters
Parameter Name Data Type Default Description
Value
ch int - • 1 : channel 1
• 2 : channel 2
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function outputs the channel value corresponding to the controller analog output.
Parameters
Parameter Name Data Type Default Description
Value
ch int - • 1 : channel 1
• 2 : channel 2
Return
Value Description
0 Success
Exception
Exception Description
Example
7.1.20 get_analog_input(ch)
Features
This function reads the channel value corresponding to the controller analog input.
Parameters
Parameter Name Data Type Default Description
Value
ch int - • 1 : channel 1
• 2 : channel 2
Return
Value Description
Exception
Exception Description
Example
7.2 TP Interface
Features
This function provides a message to users through the Teach Pendant. The higher level controller receives the
string and displays it in the popup window, and the window must be closed by a user’s confirmation.
Parameters
Parameter Data Type Default Value Description
Name
Return
Value Description
0 Success
Exception
Exception Description
Example
7.2.2 tp_log(message)
Features
This function records the user-written log to the Teach Pendant.
Parameters
Parameter Data Default Description
Name Type Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function receives the user input data through the Teach Pendant.
Parameters
Parameter Data Type Default Description
Name Value
Return
Value Description
Exception
Exception Description
Example
1 q1 = posj( 10 , 10 , 10 , 10 , 10 , 10 )
2 q2 = posj( 20 , 20 , 20 , 20 , 20 , 20 )
3 q3 = posj( 30 , 30 , 30 , 30 , 30 , 30 )
4 q4 = posj( 40 , 40 , 40 , 40 , 40 , 40 )
5 q5 = posj( 50 , 50 , 50 , 50 , 50 , 50 )
6 q6 = posj( 60 , 60 , 60 , 60 , 60 , 60 )
7
8 int_y = tp_get_user_input( "message1" , input_type = DR_VAR_INT)
9 if int_y = = 1 : # Moves to q1 if the TP user input is 1.
10 movej(q1, vel = 30 , acc = 30 )
11 else : # Moves to q2 if the TP user input is not 1.
12 movej(q2, vel = 30 , acc = 30 )
13
14 float_y = tp_get_user_input( "message2" , input_type =
DR_VAR_FLOAT)
15 if float_y = = 3.14 : # Moves to q3 if the TP user input is
3.14.
16 movej(q3, vel = 30 , acc = 30 )
17 else : # Moves to q4 if the TP user input is not 3.14.
18 movej(q4, vel = 30 , acc = 30 )
19
20 str_y = tp_get_user_input( "message3" , input_type = DR_VAR_STR)
21 if str_y = = "a" : # Moves to q5 if the TP user input is
"a".
22 movej(q5, vel = 30 , acc = 30 )
23 else : # Moves to q6 if the TP user input is not "a".
24 movej(q6, vel = 30 , acc = 30 )
25
26 bool_y = tp_get_user_input( "message3" , input_type =
DR_VAR_BOOL)
27 if bool_y = = True : # Moves to q5 if the TP user input
is "True or 1".
28 movej(q5, vel = 30 , acc = 30 )
29 else : # Moves to q6 if the TP user input is
"False or 0"
30 movej(q6, vel = 30 , acc = 30 )
7.3 Thread
Features
This function creates and executes a thread. The features executed by the thread are determined by the
functions specified in th_func_name.
Note
The following constraints are applied when using the thread command.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Exception Description
Example
7.3.2 thread_stop(th_id)
Features
This function terminates a thread.
The program is automatically terminated when the DRL program is terminated even if the thread_stop()
command is not used.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
1 def fn_th_func():
2 if check_motion() = = 0 : # No motion in action
3 set_digital_output( 1 , OFF)
4 else :
5 set_digital_output( 1 , ON)
6 #----- Main routine --------------------------------------
7 th_id = thread_run(fn_th_func, loop = True )
8
9 # do something…
10 thread_stop(th_id) # Stops the thread.
7.3.3 thread_pause(th_id)
Features
This function temporarily suspends a thread.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Value Description
Exception
Exception Description
Example
1 def fn_th_func():
2 if check_motion() = = 0 : # No motion in action
3 set_digital_output( 1 , OFF)
4 else :
5 set_digital_output( 1 , ON)
6 #----- Main routine --------------------------------------
7 th_id = thread_run(fn_th_func, loop = True )
8
9 # do something…
10
11 thread_pause(th_id) # Suspends the thread.
7.3.4 thread_resume(th_id)
Features
This function resumes a temporarily suspended thread.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Example
1 def fn_th_func():
2 if check_motion() = = 0 : # No motion in action
3 set_digital_output( 1 , OFF)
4 else :
5 set_digital_output( 1 , ON)
6
7 #----- Main routine --------------------------------------
8 th_id = thread_run(fn_th_func, loop = True )
9
10 # do something…
11 thread_pause(th_id) # Suspends the thread.
12
13 # do something…
14 thread_resume(th_id) # Resumes the suspended thread.
7.3.5 thread_state(th_id)
Features
This function checks the status of a thread.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
1 RUN (TH_STATE_RUN)
2 PAUSE (TH_STATE_PAUSE)
3 STOP (TH_STATE_STOP)
Exception
Exception Description
Example
1 def fn_th_func():
2 if check_motion() = = 0 : # No motion in action
3 set_digital_output( 1 , OFF)
4 else :
5 set_digital_output( 1 , ON)
6
7 th_id = thread_run(fn_th_func, loop = True )
8 state1 = thread_state(th_id)
9
10 thread_pause(th_id)
11 state2 = thread_state(th_id)
45 wait( 0.1 )
th_client thread: Converts the data received from the server into a string and saves it in g_cmd.
th_check_io thread: Checks the state of contact no. 1 and terminates the program if it is ON.
If "a" is received from the server, it moves to p1 and sends "end" to the servers.
If "b" is received from the server, it moves to p2 and sends "end" to the servers.
If "c" is received from the server, it moves to p3 and sends "end" to the servers.
7.4 Others
7.4.1 wait(time)
Features
This function waits for the specified time.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
7.4.2 exit()
Features
This function terminates the currently running program.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 exit()
7.4.3 sub_program_run(name)
Features
It executes a subprogram saved as a separate file.
Parameter
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Note
• The first line of the subprogram must have the phrase "from DRCF import *".
• When programming with a teaching pendant, this phrase is automatically inserted.
• If the global variable names of the main program and subprograms are the same, they operate
as different variables. Variables cannot be referenced by each other.
• If you need to share variables between the main program and subprograms, use system
variables.
• System variables are set through the teaching pendant. Please refer to the user manual for
detailed usage.
Example
7.4.4 drl_report_line(option)
Features
This command is used to turn ON / OFF the execution line display function when the DRL script is running. When
the run line display function is turned OFF, the time required to execute the run line display function is reduced,
which significantly speeds up the execution of the DRL.
Caution
The following features do not operate in the section where the execution line display function is turned
OFF.
• Execution time display by line
• Variable monitoring
• System Variable Update
• Step by Step in Debug mode
• Brake Point in Debug mode
Parameter
Parameter Name Data Type Default Value Description
Return
Value Description
None -
Example
1 x = 0
2 y = 0
3
4 drl_report_line(OFF) # Execution line display function OFF
5 while x < 1000 : # Execution line not displayed (speed
up execution)
6 x + = 1 # Execution line not displayed
(speed up execution)
7 drl_report_line(ON) # Execution line display function ON
8 x = 0 # Execution line shown
9 y = 0 # Execution line shown
Features
This command is used when interworking is required for information on variables (global variables, system
variables, etc.) created when the program is executed, in addition to the system information already defined
and linked with KT Smart Factory.
Caution
Please note that this function will not work if the linkage information is not set in the KT Smart
Factory menu in the Setup menu.
The KT Smart Factory menu only appears when setting up KT-specific licenses.
Parameter
Parameter Name Data Type Default Value Description
Return
Value Description
None -
Example
1 count = 0
2
3 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ), vel = 30 , acc = 30 )
4 while True :
5 movej(posj( 0 , 0 , - 90 , 0 , 90 , 0 ), vel = 30 , acc = 3
0 )
6 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ), vel = 30 , acc = 30 )
7 count = count + 1
8 set_fm(“TotalCount”, count)
7.4.6 get_robot_model()
Features
This is a command to read the model name of the robot.
Return
Value Description
Example
1 model = get_robot_model()
2
3 if model = = "M1013" :
4 set_velj( 30 )
5 else :
6 set_velj( 50 )
7.4.7 get_robot_serial_num()
Features
This is a command to read the serial number of the robot.
Return
Value Description
Example
1 serial_num = get_robot_serial_num()
7.4.8 check_robot_jts()
Features
This is a command to check whether the robot is equipped with a joint torque sensor.
Return
Value Description
0 Success
Example
1 if check_robot_jts() ! = True :
2 movej([ 0 , 0 , 90 , 0 , 90 , 0 ], 60 , 30 )
3 else :
4 movej([ 0 , 0 , 0 , 0 , 0 , 0 ], 60 , 30 )
7.4.9 check_robot_fts()
Features
This is a command to check whether the robot is equipped with a force torque sensor.
Return
Value Description
0 Success
Example
1 if check_robot_fts() ! = True :
2 movej([ 0 , 0 , 90 , 0 , 90 , 0 ], 60 , 30 )
3 else :
4 movej([ 0 , 0 , 0 , 0 , 0 , 0 ], 60 , 30 )
7.4.10 start_timer()
Features
This is a command to measure the execution time of the simulation program of the controller. When used with
the end_timer() command, it returns the execution time of the script between the two functions.
Caution
This function is for measuring motion execution time in Windows environment and Linux environment.
When measuring in Real mode in an emulator (virtual controller) environment, incorrect values may be
returned.
Return
Value Description
0 Success
Example
1 start_timer()
2 wait( 1 )
3 t = end_timer()
4 tp_log( "tttt={0} sec" . format (t))
Related Commands
• end_timer()(p. 273)
7.4.11 end_timer()
Features
This is a command to measure the execution time of the simulation program of the controller. When used with
the start_timer() command, it returns the execution time of the script between the two functions.
Caution
This function is for measuring motion execution time in Windows environment and Linux environment.
When measuring in Real mode in an emulator (virtual controller) environment, incorrect values may be
returned.
Return
Value Description
Example
1 start_timer()
2 wait( 1 )
3 t = end_timer()
4 tp_log( "tttt={0} sec" . format (t))
Related Commands
• start_timer()(p. 273)
8 Mathematical Function
8.1.1 ceil(x)
Features
This function returns the smallest integer value of integers equal to or larger than x. It truncates up to the
integer.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
rounded integer -
Exception
Exception Description
8.1.2 floor(x)
Features
This function returns the largest integer value of integers equal to or smaller than x. It rounds down to the
nearest one.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
rounded integer -
Exception
Exception Description
8.1.3 pow(x, y)
Features
Return x raised to the power of y.
Parameters
Parameter Name Data Type Default Description
Value
x float -
y float -
Return
Value Description
Exception
Exception Description
8.1.4 sqrt(x)
Features
This function returns the square root of x.
Parameters
Parameter Data Defaul Description
Name Type t Value
x float - -
Return
Value Description
Exception
Exception Description
8.1.5 log(x, b)
Features
This function returns the log of x with base b.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
the logarithm of f to -
the base of b.
Exception
Exception Description
8.1.6 d2r(x)
Features
This function returns the x degrees value to radians.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
8.1.7 r2d(x)
Features
This function returns the x radians value to degrees.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
8.1.8 random()
Features
This function returns a random number between 0 and 1.
Return
Value Description
Exception
Exception Description
8.2.1 sin(x)
Features
This function returns the sine value of x radians.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
the sine of x -
Exception
Exception Description
8.2.2 cos(x)
Features
This function returns the sine value of x radians.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
the cosine of x -
Exception
Exception Description
8.2.3 tan(x)
Features
This function returns the tangent value of x radians.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
the tangent of x -
Exception
Exception Description
8.2.4 asin(x)
Features
This function returns the arc sine value of x radians.
Parameters
Parameter Name Data Type Default Description
Value
x float -
Return
Value Description
Exception
Exception Description
8.2.5 acos(x)
Features
This function returns the arc cosine value of x radians.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Value Description
Exception
Exception Description
8.2.6 atan(x)
Features
This function returns the arc tangent value of x radians.
Parameters
Parameter Name Data Type Default Description
Value
x float - -
Return
Return Description
Exception
Exception Description
8.2.7 atan2(y, x)
Features
This function returns the arc tangent value of y/x radians.
Parameters
Parameter Name Data Type Default Value Description
y float - -
x float - -
Return
Value Description
Exception
Exception Description
8.3.1 norm(x)
Features
This function returnesthe L2 norm of x.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
8.3.2 rotx(angle)
Features
This function returns a rotation matrix that rotates by the angle value along the x-axis.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 rotm = rotx( 30 )
8.3.3 roty(angle)
Features
This function returns a rotation matrix that rotates by the angle value along the y-axis.
Parameters
Parameter Name Data type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 rotm = roty( 30 )
8.3.4 rotz(angle)
Features
This function returns a rotation matrix that rotates by the angle value along the z-axis.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 rotm = rotz( 30 )
8.3.5 rotm2eul(rotm)
Features
This function receives a rotation matrix and returns the Euler angle (zyz order) to degrees. Of the Euler angle (rx,
ry, rz) returned as a result, ry is always a positive number.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
8.3.6 rotm2rotvec(rotm)
Features
This function receives a rotation matrix and returns the rotation vector (angle/axis representation).
Parameters
Return
Value Description
Exception
Exception Description
Example
8.3.7 eul2rotm([alpha,beta,gamma])
Features
This function transforms a Euler angle (zyz order) to a rotation matrix.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 eul = [ 90 , 90 , 0 ]
2 rotm = eul2rotm (eul)
8.3.8 eul2rotvec([alpha,beta,gamma])
Features
This function transforms a Euler angle (zyz order) to a rotation vector.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 eul = [ 90 , 90 , 0 ]
2 rotvec = eul2rotvec (eul)
8.3.9 rotvec2eul([rx,ry,rz])
Features
This function transforms a rotation vector to a Euler angle (zyz).
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 rotvec = [ 0.7854 , 0 , 0 ]
2 eul = rotvec2eul(rotvec) # eul=[45,0,0]
8.3.10 rotvec2rotm([rx,ry,rz])
Features
This function transforms a rotation vector to a rotation matrix.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
8.3.11 htrans(posx1,posx2)
Features
This function returns the pose corresponding to T1*T2 assuming that the homogeneous transformation
matrices obtained from posx1 and posx2 are T1 and T2, respectively.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
8.3.12 get_intermediate_pose(posx1,posx2,alpha)
Features
This function returns posx located at alpha of the linear transition from posx1 to posx2. It returns posx1 if alpha
is 0, the median value of two poses if alpha is 0.5, and posx2 if alpha is 1.
Parameters
Parameters Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
Features
This function returns the distance between two pose positions in [mm].
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
float [mm]
Exception
Exception Description
Example
Features
This function returns the normal vector of a surface consisting of three points (posx) in the task space. This
direction is clockwise.
Parameters
Parameter Name Data Type Default Description
Value
x1 posx - posx or
list position list
(float[6])
x2 posx - posx or
list position list
(float[6])
x3 posx - posx or
list position list
(float[6])
Return
Value Description
Exception
Exception Description
Example
8.3.15 add_pose(posx1,posx2)
Features
This function obtains the sum of two poses.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
8.3.16 subtract_pose(posx1,posx2)
Features
This function obtains the difference between two poses.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
8.3.17 inverse_pose(posx1)
Feature
This function returns the posx value that represents the inverse of posx.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
Features
This function obtains the inner product of the translation component when two poses are given.
Parameters
Return
Value Description
Exception
Exception Description
Example
Features
This function obtains the outer product of the translation component when two poses are given.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
8.3.20 unit_pose(posx1)
Features
This function obtains the unit vector of the given posx translation component.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
9.1 Serial
Features
This function opens a serial communication port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
9.1.2 serial_close(ser)
Features
This function closes a serial communication port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
9.1.3 serial_state(ser)
Featuers
This function returns the status of a serial communication port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
Features
This function sets the timeout between the bytes (inter-byte) when reading and writing to the port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function writes the data (tx_data) to a serial port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function reads the data from a serial port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Exception
Exception Description
Exception Description
Example
9.1.7 serial_get_count()
Features
This function reads the number of devices connected to USB to Serial.
Return
Value (port_info, device_name) Description
Exception
Exception Description
Example
9.1.8 serial_get_info(id)
Features
This function reads the port information and device name of the connected USB to Serial.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value (port_info, device_name) Description
Exception
Exception Description
Example
17
18 tp_popup( "res ={0}, rx_data={1}" . format (res, rx_data))
19
20 rxd1 = int .from_bytes(rx_data[ 10 : 10 + 4 ], byteorder = 'big
' , signed = True )
21 rxd2 = int .from_bytes(rx_data[ 14 : 14 + 4 ], byteorder = 'big
' , signed = True )
22
23 tp_popup( "res={0}, rxd1={1}, rxd2={2}" . format (res, rxd1,
rxd2))
24
25 #Close the serial port
26 serial_close(ser)
Connect the USB to serial device to the USB port and send byte type send_data.
Since RXD(2pin) and TXD(3pin) are connected to receive the transmitted data as it is,
9.2 Tcp/Client
Features
This function creates a socket and attempts to connect it to a server (ip, port).
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
9.2.2 client_socket_close(sock)
Features
This function terminates communication with the server. To reconnect to the server, the socket must be closed
with client_socket_close(sock) and reopened.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Successful disconnection
Exception
Exception Description
Example
9.2.3 client_socket_state(sock)
Features
This function returns the socket connection status.To know the connection status with the server, check the
return value of client_socket_read or client_socket_write (see Example 2).
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
Exception
Exception Description
Example
Example 2
Features
This function transmits data to the server.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Description
0 Success
-2 Server is disconnected, or
socket.error occurred during a data transfer
Exception
Exception Description
Example
Features
This function receives data from the server.
Parameters
Parameter Name Data Type Default Description
Value
Return
Exception
Exception Description
Example
and that the received packets are sent to the client as they are (mirroring).
The example connects to the server and sends the string "abcd". (b converts the string to a byte type.)
res = 4 and rx_data=b"abcd" since the server transmits the received data as is.
13
14 res, rx_data = client_socket_read(g_sock)
15 tp_popup( "res={0}, rx_data ={1}" . format (res, rx_data),
DR_PM_MESSAGE)
16
17 rxd1 = int .from_bytes(rx_data[ 10 : 10 + 4 ], byteorder = 'big
' , signed = True )
18 rxd2 = int .from_bytes(rx_data[ 14 : 14 + 4 ], byteorder = 'big
' , signed = True )
19
20 tp_popup( "res={0}, rxd1={1}, rxd2={2}" . format (res, rxd1,
rxd2), DR_PM_MESSAGE)
21
22 client_socket_close(g_sock)
The example connects to the server and sends a byte type send_data.
res = 18 and rx_data=send_data since the server transmits the received data as is.
Example 3 : Reconnection
1 def fn_reconnect():
2 global g_sock
3 client_socket_close(g_sock)
4 g_sock = client_socket_open( "192.168.137.200" , 20002 )
5 return
6
7 g_sock = client_socket_open( "192.168.137.200" , 20002 )
8 tp_popup( "connect O.K!" ,DR_PM_MESSAGE)
9
10 client_socket_write(g_sock, b "abcd" )
11 wait( 0.1 )
12
13 while 1 :
14 res, rx_data = client_socket_read(g_sock)
15 if res < 0 :
16 fn_reconnect()
17 else :
18 tp_popup( "res={0}, rx_data ={1}" . format (res, rx_data),
DR_PM_MESSAGE)
19 wait( 0.1 )
A negative value is returned if the connection to the server is terminated or there is a communication problem.
9.3 Tcp/Server
9.3.1 server_socket_open(port)
Features
The robot controller creates a server socket and waits for the connection to the client. Returns the connected
socket when the client is connected.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
2 # Opens the port 20002 and waits until the client connects.
3 # The connected socket is returned if the connection is
successful.
4 # The data is read, written, and closed using the returned socket
as shown below.
5
6 server_socket_write(sock, b "123abc" ) # Sends data to the client
(b represents the byte type).
7 res, rx_data = server_socket_read(sock) # Receives the data
from the client.
8
9 server_socket_close(sock) # Closes the connection to the client.
9.3.2 server_socket_close(sock)
Features
This function terminates communication with the client. To reconnect to the client, the socket must be closed
with server_socket_close(sock) and reopened.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Successful disconnection
Exception
Exception Description
Example
9.3.3 server_socket_state(sock)
Features
This function returns the socket status.
To know the connection status with the client, check the return value of server_socket_read or
server_socket_write (see Example 2).
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example 1
Example 2
Features
This function transmits data to the client.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
-2 client is disconnected, or
socket.error occurred during a data transfer
Exception
Exception Description
Example
Features
This function reads data from the client.
Parameters
Parameter Name Data Type Default Description
Value
Return
Example
and that the received packets are sent to the server as they are (mirroring).
The example opens the port 20002 and waits until the client connects.
res = 4 and rx_data=b"abcd" since the client transmits the received data as is.
res = 18 and rx_data=send_data since the client transmits the received data as is.
Example 3 : Reconnection
1 def fn_reopen():
2 global g_sock
3 server_socket_close(g_sock)
4 g_sock = server_socket_open( 20002 )
5 return
6
7 g_sock = server_socket_open( 20002 )
8 tp_popup( "connect O.K!" ,DR_PM_MESSAGE)
9
10 server_socket_write(g_sock, b "abcd" )
11 wait( 0.1 )
12
13 while 1 :
14 res, rx_data = server_socket_read(g_sock)
15 if res < 0 :
16 fn_reopen()
17 else :
18 tp_popup( "res={0}, rx_data ={1}" . format (res, rx_data),
DR_PM_MESSAGE)
19 wait( 0.1 )
A negative value is returned if the connection to the client is terminated or there is a communication problem.
The function reopen() is called to wait for the client connection if a negative value is returned.
9.4 Modbus
Features
This function registers the ModbusTCP signal. The Modbus I/O must be set in the Teach Pendant I/O set-up
menu. Use this command only for testing if it is difficult to use the Teach Pendant. The Modbus menu is disabled
in the Teach Pendant if it is set using this command.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function registers the ModbusRTU signal. The Modbus I/O must be set in the Teach Pendant I/O set-up
menu. Use this command only for testing if it is difficult to use the Teach Pendant. The Modbus menu is disabled
in the Teach Pendant if it is set using this command.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function registers the ModbusTCP FC15 & FC16 multiple signal. The Modbus I/O must be set in the Teach
Pendant I/O set-up menu. Use this command only for testing if it is difficult to use the Teach Pendant. The
Modbus menu is disabled in the Teach Pendant if it is set using this command.
Note
Initial value setting function is not supported.
Parameters
Parameter Data Type Default Value Description
Name
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function registers the ModbusRTU FC15 & FC16 multiple signal. The Modbus I/O must be set in the Teach
Pendant I/O set-up menu. Use this command only for testing if it is difficult to use the Teach Pendant. The
Modbus menu is disabled in the Teach Pendant if it is set using this command.
Note
Parameters
Parameter Name Data Default Value Description
Type
Return
Value Description
0 Success
Exception
Exception Description
Example
9.4.5 del_modbus_signal(name)
Features
This function deletes the registered Modbus signal. The Modbus I/O must be set in the Teach Pendant I/O set-up
menu. Use this command only for testing if it is difficult to use the Teach Pendant. The Modbus menu is disabled
in the Teach Pendant if it is set using this command.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Negative Failed
value
Exception
Exception Description
Example
9.4.6 del_modbus_signal_multi(name)
Features
This function deletes the registered Modbus multiple signal. The Modbus I/O must be set in the Teach Pendant
I/O set-up menu. Use this command only for testing if it is difficult to use the Teach Pendant. The Modbus menu
is disabled in the Teach Pendant if it is set using this command.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function sends the signal to an external Modbus system.
Parameters
Note
When registered as a multiple signal, it is available by adding address value index to signal name.
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
This function sends multiple signals to the Modbus Slave unit.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 # Modbus digital I/O output contact "d1" OFF, "d2" ON, and "d3" ON
Features
This function sends the signal to an external Modbus system.
Parameters
Parameter Name Data Type Default Description
Value
Note
An error occurs if the number of singals registered in the multiple signal name does not match the
number of elemensts in the output value list.
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
9.4.10 get_modbus_input(iobus)
Features
This function reads the signal from the Modbus Slave unit. Parameters
Parameters
Parameter Name Data Type Default Description
Value
Note
When registered as a multiple signal, it is available by adding address value index to signal name.
Return
Value Description
Exception
Exception Description
Example
9.4.11 get_modbus_inputs(iobus_list)
Features
This function reads multiple signals from the Modbus Slave unit.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 # Modbus digital I/O input signal "di1" =OFF, "di2"=ON, and "di3"
=ON
2 res = get_modbus_inputs(iobus_list = [ "di1" , "di2" , "di3" ]
)
3 #res expected value = 0b110 (binary number), 6
(decimal number), or 0x06 (hexadecimal number)
4
5 # Modbus digital I I/O input signal "di4" OFF and "di5" ON
6 res = get_modbus_inputs([ "di4" , "di5" ])
7 #res expected value = 0b10 (binary number), 2
(decimal number), or 0x02 (hexadecimal number)
9.4.12 get_modbus_inputs_list(iobus_list)
Features
It is the command for reading multiple register type open signals from an external Modbus Slave unit.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
Features
This function reads the signal from the Modbus Slave unit.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
Features
This function waits until the specified signal value of the Modbus digital I/O becomes val (ON or OFF). The
waiting time can be changed with a timeout setting. The waiting time ends, and the result is returned if the
waiting time has passed. This function waits indefinitely if the timeout is not set.
Parameters
Note
When registered as a multiple signal, it is available by adding address value index to signal name.
Return
Value Description
0 Success
-1 Failed (time-out)
Exception
Exception Description
Example
Features
It is used to export values to the General Purpose Register area of the Modbus TCP Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
1 set_modbus_slave( 128 , 0 )
2 set_modbus_slave( 255 , 65535 )
9.4.16 get_modbus_slave(address)
Features
It is used to import values by approaching the General Purpose Register area of the Modbus TCP Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
9.4.17 modbus_crc16(data)
Features
When using the Modbus protocol, this command reduces the load on Modbus CRC16 calculations.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Value Description
Exception
Exception Description
Example
1 data = b "\x01\x02\x03\x04\x05\x06"
2 crchigh, crclow = modbus_crc16(data)
3 #crchigh = 186(DEC), BA(HEX)
4 #crclow = 221(DEC), DD(HEX)
9.4.18 modbus_send_make(send_data)
Features
When using the Modbus protocol, this command provides the result data including the Modbus CRC16 result for
the send data.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
result_data Data in which transmission data and CRC16 value are conbined
Exception
Exception Description
Example
1 senddata = b "\x01\x02\x03\x04\x05\x06"
2 resultdata = modbus_send_make(senddata)
3 #resultdata = b'\x01\x02\x03\x04\x05\x06\xba\xdd’
9.4.19 modbus_recv_check(recv_data)
Features
When using Modbus protocol, this command to check data integrity using CRC16 value for receive data.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
res True/False
Exception
Exception Description
Example
1 #recvdata = b”\x01\x02\x03\x04\x05\x06\xba\xdd”
2 res = modbus_recv_check(recvdata)
3 #recv = True
9.4.20 modbus_unsigned_to_signed(unsigned_data)
Features
When using Modbus protocol, this is a command to convert 2 bytes unsigned data into signed data.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 unsigned_data = 40000
2 signed_data = modbus_unsigned_to_signed(unsigned_data)
Features
It is used to export values to the Output Bit General Purpose Register area of the Industrial Ethernet(EtherNet/
IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
val int - ON : 1
OFF : 0
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
It is used to export values to the Output Int General Purpose Register area of the Industrial Ethernet(EtherNet/
IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Example
Features
It is used to export values to the Output Float General Purpose Register area of the Industrial Ethernet(EtherNet/
IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
9.5.4 get_output_register_bit(address)
Features
It is used to import values to the Output Bit General Purpose Register area of the Industrial Ethernet(EtherNet/
IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 a = get_output _register_bit ( 0 )
2 b = get_output _register_bit ( 63 )
9.5.5 get_output_register_int(address)
Features
It is used to import values to the Output Int General Purpose Register area of the Industrial Ethernet(EtherNet/
IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 a = get_output _register_int ( 0 )
2 b = get_output_register_int( 23 )
9.5.6 get_output_register_float(address)
Features
It is used to import values to the Output Float General Purpose Register area of the Industrial
Ethernet(EtherNet/IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 a = get_output _register_float ( 0 )
2 b = get_output _register_float ( 63 )
9.5.7 get_input_register_bit(address)
Features
It is used to import values to the Input Bit General Purpose Register area of the Industrial Ethernet(EtherNet/IP,
PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 a = get_input _register_bit ( 0 )
2 b = get_input_register_bit ( 63 )
9.5.8 get_input_register_int(address)
Features
It is used to import values to the Input Int General Purpose Register area of the Industrial Ethernet(EtherNet/IP,
PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 a = get_input _register_int ( 0 )
2 b = get_input_register_int( 23 )
9.5.9 get_input_register_float(address)
Features
It is used to import values to the Input Float General Purpose Register area of the Industrial Ethernet(EtherNet/
IP, PROFINET) Slave.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 a = get_input _register_float ( 0 )
2 b = get_input _register_float ( 63 )
9.6 FOCAS
Features
This command is used to connect to the Machine Center Controller. When connected normally, a handle value
greater than 0 is returned.
The connectable controllers are as follows.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
9.6.2 focas_disconnect(handle)
Features
This command is used to disconnect from the Machine Center Controller.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
errorCode 0 : Success
Value other than 0: error (see focas_get_error_str)
Exception
Exception Description
Example
Features
This command is used to read PMC Data of Machine Center Controller. It is used when the data return type is bit.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
Features
This command is used to read PMC Data of Machine Center Controller. It is used when the data return type is
char (1Byte).
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to read PMC Data of Machine Center Controller. It is used when the data return type is
word (2Byte).
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to read PMC Data of Machine Center Controller. It is used when the data return type is
long (4Byte).
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to read PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to read PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to write PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
write_data Int ON : 1
OFF : 0
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to write PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to write PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to write PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to write PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
This command is used to write PMC Data of Machine Center Controller.
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
Features
It is used to analyze the errorCode returned when using the Focas Library related function. When entering an
error code, the cause of the related error is returned as a string.
Parameter
Parameter Name Data Type Default Description
Value
errorCode int - Error code returned after FOCAS related DRL execution
Return
Value Description
Exception
Exception Description
ErrorCode Details
Exception Description
Exception Description
-6 "abnormal error"
-5 "system error"
Exception Description
-1 "busy error"
0 "no problem"
5 "data error"
10 "buffer error"
11 "path error"
Exception Description
-101 "The maximum number of machine tools that can be connected has
been exceeded."
Example
10.1 Overview
Doosan Robotics provides the commands to guide robots with vision by connecting the robots to an external
vision system. It enables connecting a robot to a 2D vision system which can measure the object position (Tx,
Ty) data and the rotation (Rz) data (offset information) to guide the inputted robot task, and the commands can
receive the measurement data inputs of multiple objects. The installation and tasks of the robot application
using the 2D vision system need to calibrate the visual coordinate system of the vision system to the physical
coordinate system of the robot system (coordinate system correction). When using an external vision system,
the vision system must calibrate the coordinate system and transfer the corrected coordinate data to the robot.
The vision system can be installed in the Eye-in-hand mode connected to the robot or in-line mode separated
from the robot. It must be fixed so that the relative position of the robot and vision system does not change
during a task. The vision system and the robot controller communicate through the TCP/IP protocol, and
communication is established when the cable of the vision system is connected to the wired hub port of the
robot controller.
vs_disconnect()(p. 406)
vs_set_job(job_name)(p. 407)
visor_job_change(index)(p. 408)
6 Custom vs_request(cmd)(p. 414)
vs_result()(p. 415)
10.2.1 vs_set_info(type)
Features
This function set the type of vision system to use.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
• Supported Model
Type Model
DR_VS_CUSTOM
Features
This function establishes communication with the vision system.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Connection success
-1 Connection failed
Example
10.2.3 vs_disconnect()
Features
This function terminates the connection to the vision system.
Return
Value Description
N/A N/A
Example
10.2.4 vs_get_job()
Features
This function loaded the task name, currently loaded in the vision system.(*VS_TYPE: DR_VS_COGNEX,
DR_VS_SICK)
Return
Value Data Type Description
Example
10.2.5 vs_set_job(job_name)
Features
This function loaded the entered task into the vision system.
Parameters
Parameter Data Default Description
Name Type Value
Return
Value Data Type Description
0 int Success
-1 int Failed
Example
Features
Loads the entered index of the corresponding job.
(*VS_TYPE: DR_VS_COGNEX)
Return
Value Description
1 Success
-1 Fail
Example
10.2.7 visor_job_change(index)
Features
Loads the Vision Sensor setting using the entered number.
(*VS_TYPE: DR_VS_VISOR)
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
10.2.8 vs_trigger()
Features
This function transmits the measurement command to the vision system. If the measurement is successful, the
result is returned.(*VS_TYPE: DR_VS_COGNEX, DR_VS_SICK)
Return
Value Data Type Description
Example
Features
Enter the initial position information of the object to perform the vision guidance operation.
(*VS_TYPE: DR_VS_COGNEX, DR_VS_SICK)
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Data Type Description
-1 int Failed
Example
Features
The coordinate of the robot is calculated using the coordinate values, measured in the vision system. The initial
value should be entered in advance through vs_set_init_pos.
Parameters
Parameter Name Data Type Default Description
Value
vs_pos int 1 Pos number of the robot initial value to calculate offset
coordinate
Return
Value Data Type Description
-1 int Failed
Example
Example
10.2.12 vs_request(cmd)
Features
This function sets the feature for the vision system to request
(*VS_TYPE: DR_VS_CUSTOM)
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
-1 Failed
Example
10.2.13 vs_result()
Features
This function retrieves the processing result of the vision system.
(*VS_TYPE: DR_VS_CUSTOM)
Return
Value Description
cnt Success
(>=1) The number of objects detected by the vision system
result Position list as a result of the vision system (x coordinate, y coordinate, rotation
value)
Example
1 vs_set_info(DR_VS_CUSTOM)
2 res = vs_connect( "192.168.137.200" , 9999 ) #Vision and
communication connection attempt
3 if res ! = 0 : #Check the result of communication
connection
4 tp_popup( "connection fail" ,DR_PM_MESSAGE) #If connection
fails, program ends
5 exit()
6
7 ret = vs_request( 1 ) #Request for object vision
measurement information
8
9 cnt, result = vs_result() # Get object measurement
result information
10
11 for i in range (cnt):
12 x = result[i][ 0 ]
13 y = result[i][ 1 ]
14 t = result[i][ 2 ]
15 tp_popup( "x={0},y={1}, t={2}" . format (result[i][ 0 ],
result[i][ 1 ], result[i][ 2 ]),DR_PM_MESSAGE)
Communication Protocol
The vision system must conform to the following protocol to ensure that vision commands run properly.
vs_request (cmd)
1. Robot controller → Vision system
• "MEAS_START" +cmd[4byte]
• cmd refers to the number of detected objects: Conversion of the integer to 4 bytes. ex) cmd=1 →
00000001
• ex) In case of cmd= 1 : “MEAS_START"+00000001
• Acutal packet : 4D4541535F535441525400000001
2. Vision system → Robot controller
• "MEAS_OK" is transmitted if the vision system is normal, and "MEAS_NG" is transmitted
otherwise.
vs_result()
1. Robot controller → Vision system
• “MEAS_REQUEST"
2. Vision system → Robot controller
• “MEAS_INFO" +cnt[4byte] +[(x[4byte] + y[4byte] + t[4byte]) x cnt]
• cnt refers to the number of detected objects.
Example
1 vs_set_info(DR_VS_CUSTOM)
2 res = vs_connect( "192.168.137.200" , 9999 ) #Vision and
communication connection attempt
3 if res ! = 0 :
#Check the result of communication connection
4 tp_popup( "connection fail" ,DR_PM_MESSAGE) #Upon connection
failure, program termination
5 exit()
6
7 ret = vs_request( 1 )
#Request of Vision Measurement Information for No. 1 Object
8
9 cnt, result = vs_result() #Get
object measurement result information
10
11 for i in range (cnt):
12 x = result[i][ 0 ]
13 y = result[i][ 1 ]
14 t = result[i][ 2 ]
15 tp_popup( "x={0},y={1}, t={2}" . format (result[i][ 0 ],
result[i][ 1 ], result[i][ 2 ]),DR_PM_MESSAGE)
10.3 Pickit 3D
Pickit 3D commands are composed as follows.
No 구분 명령어
.
No 구분 명령어
.
pickit_disconnect()(p. 419)
5 Backup pickit_save_snapshot()(p. 424)
10.3.1 pickit_connect(ip)
Features
This function establishes communication with the vision system.
The default IP of PickIt is 192.168.66.1, and the user must use an PickIt IP in the same bandwidth range as Robot
IP. See the Pickit Support site for details on how to use it.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Connection success
-1 Connection failed
Example
10.3.2 pickit_disconnect()
Features
This function terminates the connection to the vision system.
Return
Value Description
N/A
Example
Features
This function loads setup_id and product_id set in the vision system.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Connection success
-1 Connection failed
Example
1 pickit_connect( "192.168.137.90" )
2 pickit_change_configuration( 6 , 8 ) # These numbers are defined
in Pickit
3 pickit_disconnect()
10.3.4 pickit_request_calibration()
Features
This function requests a calibration once from the vision system
Return
Value Description
0 Connection success
-1 Connection failed
Example
1 pickit_connect( "192.168.137.90" )
2 pickit_request_calibration()
3 pickit_disconnect()
10.3.5 pickit_detection(offset_z)
Features
This function detects the input model and returns (pick_prepos, pick_pos).
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Data type Description
Example
1 set_singular_handling(DR_AVOID)
2 set_velj( 60.0 )
3 set_accj( 100.0 )
4 set_velx( 250.0 , 80.625 )
5 set_accx( 1000.0 , 322.5 )
6
7 pickit_connect( "192.168.137.90" )
8 pickit_change_configuration( 7 , 10 ) # These numbers are
defined in Pickit
9
10 data = pickit_detection( 100 )
11 if data[ 'status' ] = = ResponseStatus.OBJECTS_FOUND:
12 # Picking motion
13 movel(data[ 'pick_prepos' ])
14 movel(data[ 'pick_pos' ])
15 movel(data[ 'pick_prepos' ])
16
17 pickit_disconnect()
10.3.6 pickit_next_object(offset_z)
Features
This function returns pick_prepos and pick_pos detected next to the input model.
Parameters
Parameter Name Data Type Default Value Description
Return
Value Data Type Description
data_dictionary = {'pick_pos':pick_pos,
{'pick_pos': posx,
'pick_prepos':pick_prepos, 'pick_pos': Model recognition
'object_age':data['object_age'], 'pick_prepos': position,
'object_type':data['object_type'], posx,
'pick_prepos': Offset value of
'object_dimensions':data['object_dimensions'],
'object_age': int, model recognition
'object_remaining':data['objects_remaining'],
'object_type': position,
'status':data['status']}
int ,
'object_age': The amount of time
'object_dimension
that has passed between the
s': int ,
capturing of the camera data and
'object_remaining' the moment the object
: int , information is sent to the robot.
This value has to be divided by
'status': int}
the MULT factor.,
'object_type': The type of object
detected at object_pose ,
'object_dimensions':
When reading array elements,
each value has to be divided by
the MULT factor. ,
'object_remaining': Only one
object per pickit_to_robot_data
message can be communicated. If
this field is non-zero, it contains
the number of remaining objects
that can be sent in next messages
to the robot. ,
'status': Contains the Pickit
status or a response to previously
received robot commands.
Example
1 pickit_connect( "192.168.137.90" )
2 pickit_change_configuration( 7 , 10 ) # These numbers are
defined in Pickit
3
4 set_singular_handling(DR_AVOID)
5 set_velj( 60.0 )
6 set_accj( 100.0 )
7 set_velx( 250.0 , 80.625 )
8 set_accx( 1000.0 , 322.5 )
10.3.7 pickit_save_snapshot()
Features
This function saves the snapshot to the server.
Return
Value Description
0 Connection success
-1 Connection failed
Example
1 pickit_connect( "192.168.137.90" )
2
3 pickit_save_snapshot()
4
5 pickit_disconnect()
Example 1
Example 2
Example 3
33 movel(data[ 'pick_prepos' ])
svm_disconnect()(p. 430)
svm_set_camera_exp_val(value)(p. 431)
svm_set_camera_gain_val(value)(p. 432)
svm_set_camera_load(job_id)(p. 433)
Landmark svm_detect_landmark(job_id)(p. 437)
Detection
svm_get_marker_offset_pose(cpos, offset, euler_mode)
(p. 438)
svm_get_barcode_db_data(index)(p. 440)
svm_compare_barcode_db_data(dbdata)(p. 441)
Features
This function establishes communication with the SVM.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Connection success
-1 Connection failed
Example
11.1.2 svm_disconnect()
Features
This function terminates the connection to the SVM.
Return
Value Description
N/A N/A
Example
11.2.1 svm_set_led_brightness(value)
Features
Set SVM LED brightness value.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
11.2.2 svm_get_led_brightness()
Features
Return the LED brightness value set in the SVM.
Return
Value Description
Example
11.2.3 svm_set_camera_exp_val(value)
Features
Set exposure value of the SVM.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
11.2.4 svm_set_camera_gain_val(value)
Features
Set SVM gain value..
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
11.2.5 svm_set_camera_load(job_id)
Features
Load LED brightness, exp, gain and focus setting saved in the Job numbered job_id.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
11.3.1 svm_set_job(job_id)
Features
This function loads the Vision task corresponding to the input id into the SVM..
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
11.4.1 svm_get_robot_pose(job_id)
Features
The robot pose information(joint coordinate system) set in the vision task is loaded. Robot pose information is
used as shoot_pose for vision task.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Desciption
-1 failed
Example
11.5.1 svm_get_vision_info(job_id)
Features
Performs the measurement command corresponding to the input vision task. The detailed information of the
measurement command of the vision work should be entered in advance through the Workcell manager(WCM).
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
Features
If the object detection/measurement is successful(1) by executing svm_get_vision_info, the detection/
measurement data is loaded. Enter the tool id and variable type for the data to be loaded.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
11.5.3 svm_detect_landmark(job_id)
Features
Detect the landmark information with respect to Camera coordinage using a job_id.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Data Type Description
Example
Features
Estimate the landmark pose with respect to Robot coordinate by using offset from the origin of the landmark.
Parameters
Parameter Name Data Type Default Description
Value
offset list[Tx, Ty, Position and angle of rotation away from the landmark
Rz] origin
Return
Value Data Type Description
rpos list[Tx, Ty, Tz, Rz, Ry, Rz'] Landmark pose based on robot coordinates or
or list[Tx, Ty, Tz, Rx, Ry, Landmark pose with offset set
Rz]
Example
2
3 offset = [ 10 , - 20 , 45 ]
4 euler_mode = True
5 rpos = svm_get_marker_offset_pose(cpos, offset, euler_mode)
6 tp_popup( "Landmark with respect to Robot={0}" . format (rpos))
7 svm_disconnect() # Disconnect to
vision
11.5.5 svm_get_detect_barcode()
Features
It detects barcodes and QR codes displayed on the screen.
Return
Value Data Type Description
Example
11.5.6 svm_get_barcode_db_data(index)
Features
Returns the value in Barcode DB in SVM using index.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Data Type Description
“-1” string If you use the wrong index or there is no information in the DB.
Example
11.5.7 svm_compare_barcode_db_data(dbdata)
Features
After comparing the entered argument with the barcode DB stored in the SVM, check whether it is a stored
value.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Data Type Description
Example
Features
Enter the initial id_list and posx_list information of the object to perform the vision guidance operation.
Caution
• Be sure to set the settings before calling the function svm_get_offset_pos (posx_robot_init,
job_id, tool_id).
• Note : id_list and pos_list should be matched with posx corresponding to each id.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
None -
Example
Features
The robot task coordinate information reflecting the vision measurement result is loaded into the robot work
coordinate input by the user.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Example
Features
Set whether (tp_popup) should be displayed when SVM error occurs.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
None -
Example
11.8.1 Example
Vision Job setting status
• After deleting all the jobs saved in WCM, create vision task / tool as below.
• Create vision task : vision_test (position tool, 1000)
• Add vision tools: print_insp (presence tool, 1001), box_size (distance tool, 1002)
• Select the "vision_test" task in TW vision command set the variable information.
• Add the following example to your custom code to test.
12 Application Commands
Features
It configures the polarity of phase A, B and the trigger method of phase S, Z of the corresponding encoder
channel.
Parameters
Parameter Name Data Type Default Description
Value
polarity_Z int 0 Trigger method of Phase Z (0: Falling edge, 1: Rising edge)
polarity_S int 0 Trigger method of Phase S (0: Falling edge, 1: Rising edge)
Return
Value Description
Exception
Exception Description
Example
1 set_extenc_polarity( 1 , 0 , 1 , 0 , 1 )
2 # External Encoder channel 1 is set to phase A, /phase B, phase Z
(falling edge), phase S (rising edge)
Related commands
set_extenc_mode
Features
It configures the operation mode of phase A, B, Z and S of the corresponding encoder channel.
1)
Compared to versions prior to V2.7.0, Integrated mode_S parameter option - 1: Strobe Signal à Encoder Count
Clear (conveyor tracking available with a single option of Encoder Count Clear), 2: works for Encoder Count
Clear (for compatibility to prior version)
Parameters
Parameter Data Default Description
Name Type Value
Return
Value Description
Exception
Exception Description
Example
1 set_extenc_mode( 1 , 2 , 20000 , 1 , 1 , 0 )
2 # External Encoder channel 1 operation mode is set as follows
3 # Phase A Count, Phase B Direction Use
4 # Pulse A Count per Z Pulse is 20000
5 # Phase Z error count accumulate compensation mode use, phase S
use
6 # Encoder Count direction is set to forward
Related commands
set_extenc_polarity
12.1.3 get_extenc_count(channel)
Features
Get the count value of the corresponding encoder channel.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 enc_cnt = get_extenc_count( 1 )
2 # External Encoder channel 1 current count value calculation
Related commands
• set_extenc_polarity(channel, polarity_A, polarity_B, polarity_Z, polarity_S)(p. 447)
• set_extenc_mode(channel, mode_AB, pulse_AZ, mode_Z, mode_S, inverse_cnt)(p. 448)
• clear_extenc_count(channel)(p. 451)
12.1.4 clear_extenc_count(channel)
Features
Reset counter value of the corresponding encoder channel to 0.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Example
1 clear_extenc_count( 1 )
2 # External Encoder channel 1 count value reset to 0
Related commands
• get_extenc_count(channel)(p. 450)
12.2.1 set_conveyor(name)
Features
If conveyor information is configured in the UI, obtain ID with the conveyor name to start the Conveyor Tracking
Application from the program and execute the command for workpiece monitoring. Workpiece monitoring is
performed on workpieces triggered in the conveyor, and monitoring continues until the program ends.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 CONV1 = set_conveyor(“conveyor1”)
Related commands
• get_conveyor_obj(conv_id, timeout=None, container_type=DR_FIFO, obj_offset_coord=None)(p. 457)
• tracking_conveyor(conv_id, time=0.3)(p. 461)
• untracking_conveyor(conv_id, time=0.3)(p. 463)
Features
Configures the conveyor and obtains Conveyor ID to allow the Conveyor Tracking Application to start. After the
command is executed, it monitors workpieces triggered in the configured conveyor until the program ends. It
can be used when you need to set parameters manually if is unavailable to configure conveyor information
through UI.
1)
Added default value for all arguments compared to versions prior to M2.4.0
2)
Added ‘ref’ argument compared to versions prior to M2.4.0 (world coordinates available)
3)
Removed ‘obj_offset_coord’ argument compared to versions prior to M2.4.0, The ‘obj_offset_coord’
argument is changed to input only in get_conveyor_obj() function.
Parameter
Parameter Name Data Type Default Value Description
Note
• Currently conv_type argument does not support Circular Conveyors!
• All workpieces that pass the Triggering Switch are monitored until they reach max_dist after
set_conveyor() or set_conveyor_ex() function execution and before the program ends.
• However, if triggering_mute_time is configured, and if the Triggering Switch activates during
the corresponding time after the previous workpiece is detected, it is not included on the
monitoring list. It is used when noise is present in the Triggering Switch or when the workpiece
needs to be removed for a certain amount of time.
• conv_coord is a coordinate system fixed to the conveyor relative to the base or world
coordinate system. Here, the x-axis of conv_coord represents the direction the conveyor
flows. From the moment the conveyor workpiece activates the triggering switch, the increased
encoder value can be converted to the length of the workpiece travel by using the
count_per_dist argument, and extending this length in the x-axis direction of the conv_coord
will position the workpiece relative to the reference coordinate system.
[Conveyor/Item Coordinate]
• conv_speed is the moving speed of the conveyor. It is used to give Info only if the conveyor
speed sensed by the encoder exceeds 200% of this speed. Therefore, if the measurement is not
possible through the TP UI, enter the approximate value.
• Speed_filter_size is the size of the moving-average filter used to estimate the conveyor speed
from the encoder. The larger the size, the more the noise can be canceled, but the tracking
accuracy may deteriorate during acceleration and deceleration.
• The area on top of the conveyor is categorized into Watch Window, Tracking Zone and Out-
Tracking Zone.
• Watch Window is the area that determines whether workpieces within the area are available for
the job when obtaining workpiece coordinates for tracking. When the get_conveyor_obj()
function is loaded, if a workpiece is not present within this area, the function is not returned,
and if a workpiece is present within this area, it returns workpiece coordinates according to
get_conveyor_obj() function options (FIFO, LIFO).
• The Tracking Zone is the area that performs Conveyor Tracking.
• The Out-Tracking Zone is the area where the robot automatically ends tracking after it
determines that the robot has exited the work space of the robot or the work space specified by
the user during continuous tracking.
• These three areas are defined with the four lengths (min_dist, max_dist, watch_window,
out_tracking_dist) as shown below.
Return
Value Description
Exception
Exception Description
Exception Description
Example
Related commands
• get_conveyor_obj(conv_id, timeout=None, container_type=DR_FIFO, obj_offset_coord=None)(p. 457)
• tracking_conveyor(conv_id, time=0.3)(p. 461)
• untracking_conveyor(conv_id, time=0.3)(p. 463)
Features
It returns the workpiece coordinate ID available for the job from the corresponding conveyor. When a function is
called, it returns the workpiece present in the Watch Zone one by one according to the container rule.
Parameters
Parameter Name Data Type Default Description
Value
list(float[6])
Note
• When calling this function, it returns the coordinates ID of each workpiece in the Watch Window
according to the container rule. For example, if you call get_conveyor_obj() function when the
workpieces are places as shown below, the workpiece ② and ③ in the Watch Window will be
candidates. At this time, if the container_type is set to DR_FIFO the corrdinates ID of ③ that
entered the Watch Window first. If it is set to DR_LIFO, it returns the coordinates ID of ② that
entered the Watch Window later. If there is no workpieces in the Watch Window at the time of
the function call, it waits until the time set in the timeout parameter and return the id if the
workpiece comes in.
In the case shown below, the workpiece coordinates are created on the right side of the workpiece and
the orientation is different from the base or world coord. At this time, if you want to position the
workpiece coordinates at the center of workpiece and make the orientation to be same with the ones of
base or world coordinates, you can apply it as obj_offset_coord = posx (-d, 0, 0, -90, 0, 0). It is not
necessary to acquire a teaching point through this TP UI, but it could utilize this method if you need to
use drl only or enter the teaching point directly.
Next, if the workpiece changes its position in a direction that is independent of the conveying direction,
or the orientation of the workpiece changes as shown below, the encoder signal alone cannot determine
the position / orientation of the workpiece. In this case, you need to detect them using external vision
sensor. After detecting this value, you can input the position/orientation change detected as
obj_offset_coord dynamically and the workpiece coordinates are created accordingly.
Return
Value Description
Note
If no workpiece to return is present, no function is returned until the timeout time expires. If the timeout
time expires but no workpiece is present, it returns -1. However, if a timeout time is not entered, it
doesn’t return continuously.
Exception
Exception Description
Example
Related commands
• tracking_conveyor(conv_id, time=0.3)(p. 461)
• untracking_conveyor(conv_id, time=0.3)(p. 463)
Features
The robot starts Conveyor Tracking.
Parameters
Parameter Name Data Type Default Description
Value
Note
If the tracking_conveyor command is given, the conveyor starts tracking from the current position of
robot. You can call task motion right after tracking_conveyor function for reducing tack time, although
transient error can occur during acceleration time.
[tracking sequence]
Return
Value Description
Negative integer If the robot is expected to exit the robot work space during acceleration
Exception
Exception Description
Exception Description
Example
1 CONV1 = set_conveyor(‘conveyor1’)
2
3 while True :
4 CONV_COORD_1 = get_conveyor_obj(CONV1)
5
6 tracking_conveyor(CONV1) # start moving to track conveyor
7
8 # task on conveyor
9 movel(posx( 0 , 0 , 50 , 0 , 0 , 0 ), ref = CONV_COORD_1)
10 movel(posx( 0 , 0 , 0 , 0 , 0 , 0 ), ref = CONV_COORD_1)
11 set_digital_output(DO_GRIPPER, 1 )
12 movel(posx( 0 , 0 , 50 , 0 , 0 , 0 ), ref = CONV_COORD_1)
13
14 untracking_conveyor(CONV1)
15 obj_count = obj_count + 1
Related commands
• untracking_conveyor(conv_id, time=0.3)(p. 463)
Features
The robot moves as its velocity goes to 0 and finish Conveyor Tracking.
Parameters
Parameter Name Data Type Default Description
Value
Note
• If a time value is shorter than the robot’s maximum deceleration speed, the robot ignores the
entered value and decelerates using the maximum deceleration speed.
• To reduce tack-time, deceleration motion is blended with task motion after
untracking_conveyor if it is called. (However, Joint motion cannot be called during
deceleration time.)
Return
Value Description
Negative integer If the robot is expected to exit the robot work space during deceleration
Exception
Exception Description
Example
1 CONV1 = set_conveyor(‘conveyor1’)
2
3 while True :
4 CONV_COORD_1 = get_conveyor_obj(CONV1)
5 tracking_conveyor(CONV1)
6
7 # task on conveyor
8 movel(posx( 0 , 0 , 50 , 0 , 0 , 0 ), ref = CONV_COORD_1)
9 movel(posx( 0 , 0 , 0 , 0 , 0 , 0 ), ref = CONV_COORD_1)
10 set_digital_output(DO_GRIPPER, 1 )
11 movel(posx( 0 , 0 , 50 , 0 , 0 , 0 ), ref = CONV_COORD_1)
12
13 untracking_conveyor(CONV1, 0.1 )
Related commands
• tracking_conveyor(conv_id, time=0.3)(p. 461)
12.3 Welding
12.3.1 app_weld_enable_digital()
Features
This enables the communication interface welding function. Only supports EtherNet/IP interface.
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 app_weld_enable_digital()
2 app_weld_disable_digital()
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
• app_weld_enable_digital()(p. 465)
12.3.2 app_weld_disable_digital()
Features
This disables the communication interface welding function.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_enable_digital()
2 app_weld_disable_digital()
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
• app_weld_enable_digital()(p. 465)
• app_weld_set_weld_cond_digital(flag_dry_run=0, vel_target=0, vel_min=0, vel_max=0, welding_mode=0,
s_2t=0, pulse_mode=0, wm_opt1=0, simulation=0, ts_opt1=0, ts_opt2=0,...)(p. 498)
• app_weld_adj_welding_cond_digital(flag_reset=None, f_target=None, vel_target=None, wv_offset=None,
wv_width_ratio=None, dynamic_cor=None, voltage_cor=None, job_number=None, synergic_id=None)
(p. 503)
• app_weld_disable_digital()(p. 467)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
12.3.3 app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,
0,0,0,0], robot_ready=[0,0,0,0,0,0,0,0,0],
error_reset=[0,0,0,0,0,0,0,0,0])
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication. This
sets the link signal interface between the robot controller and welder used for welding in the communication
data sent to the welder from the robot controller. Enter the setting values below along with details based on the
communication signal data sheet of the corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
Parameter Data Type Default Description
Name Value
welding_start Refer to the Refer to the Start Weld Command (specification for each welder)
table below table below
robot_ready Robot Status (specification for each welder)
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
Communication Interface Setting Example (EWM Welder)
1. Data Type (on/off: 0): Item selected On/Off
a. Ewm Welder Data Sheet
Byte no. Bit no. Function/description Bit assignment
• If the data type is 2 (Value), a valid data size (0x7FFF → 15 bit), minimum data value (0.0V) and
maximum data value (100.0V) must be entered.
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 app_weld_set_interface_eip_r2m_process(welding_start = [ 1 , 0 , 0
, 0 , 4 , 0 , 1 , 0 , 0 ], robot_ready = [ 1 , 0 , 0 , 0 , 5 , 0 , 1
, error_reset = [ 1 , 0 , 0 , 1 , 4 , 0 , 1 , 0 , 0 ])
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.4 app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,
0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication. This
sets the interface related to the welding mode in the communication data sent to the welder from the robot
controller. Required modes can be additionally added with the option item (wm_opt1). Enter the setting values
below along with details based on the communication signal data sheet of the corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
Parameter Name Data Type Default Description
Value
welding_mode Refer to the Refer to the Welding Mode (specification for each welder)
table below table below
s_2t Latched/Non-latched Mode (specification for each welder)
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_set_interface_eip_r2m_mode(welding_mode = [ 1 , 1 , 0 , 0
, 0 , 2 , 2 , 0 , 3 ], s_2t = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
, pulse_mode = [ 1 , 1 , 0 , 0 , 2 , 0 , 1 , 0 , 1 ],wm_opt1 = [ 0 ,
)
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.5 app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0],
inching_plus=[0,0,0,0,0,0,0,0,0], inching_minus=[0,0,0,0,0,0,0,0,0],
blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication. This
sets the interface related to the test signal setting in the communication data sent to the welder from the robot
controller. Additional functions related to the test signal can be added with the option item (ts_opt1, ts_opt2).
Enter the setting values below along with details based on the communication signal data sheet of the
corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
Parameter Data Type Default Value Description
Name
gas_test Refer to the Refer to the Gas Test Signal (specification for each welder)
table below table below
Inching_plus Forward Inching Signal (specification for each welder)
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_set_interface_eip_r2m_test(gas_test = [ 1 , 0 , 0 , 0 , 6
, 0 , 1 , 0 , 0 ], inching_plus = [ 1 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 0
, inching_minus = [ 1 , 0 , 0 , 1 , 2 , 0 , 1 , 0 , 0 ],
blow_out_torch = [ 1 , 0 , 0 , 0 , 7 , 0 , 1 , 0 , 0 ],
simulation = [ 0 , 0 , 0 , 1 , 7 , 0 , 1 , 0 , 0 ], ts_opt1 = [ 0 , 0
, ts_opt2 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ])
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.6 app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,
0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0],
voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication. This
sets the interface related to the welding condition setting in the communication data sent to the welder from
the robot controller. Enter the setting values below along with details based on the communication signal data
sheet of the corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
Parameter Name Data Type Default Description
Value
job_num Refer to the Refer to the JOB Number (specification for each welder)
table below table below
synergic_id SYNERGIC Number (specification for each welder)
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_set_interface_eip_r2m_condition(job_num = [ 1 , 1 , 0 , 3
, 0 , 4 , 8 , 0 , 255 ], synergic_id = [ 1 , 1 , 0 , 2 , 0 , 3 , 4 ,
5 ], r_wire_feed_speed = [ 1 , 2 , 1 , 6 , 0 , 6 , 15 , 0.0 , 25.0 ]
, voltage_corret = [ 1 , 2 , 1 , 8 , 0 , 6 , 15 , - 10.0 , 10.0 ],
dynamic_correct = [ 1 , 2 , 0 , 10 , 0 , 6 , 15 , - 40 , 40 ])
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.7 app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0],
opt2=[0,0,0,0,0,0,0,0,0], opt3=[0,0,0,0,0,0,0,0,0],
opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0],
opt6=[0,0,0,0,0,0,0,0,0],...)
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication.
Required functions other than basic setting items (app_weld_set_interface_eip_r2m_process(),
app_weld_set_interface_eip_r2m_mode(), app_weld_set_interface_eip_r2m_test(),
app_weld_set_interface_eip_r2m_condition()) in the communication data sent to the welder from the robot
controller can be set with the corresponding command. Enter the setting values below along with details based
on the communication signal data sheet of the corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
opt1 Refer to the Refer to the Option Item (specification for each welder)
table below table below
opt2
opt3
opt4
opt5
opt6
opt7
opt8
opt9
opt10
opt11
opt12
opt13
opt14
opt15
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_set_interface_eip_r2m_option(opt1 = [ 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 ], opt2 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
opt3 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt4 = [ 0 , 0 , 0 , 0
, opt5 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt6 = [ 0 , 0 , 0 ,
, opt7 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt8 = [ 0 , 0 , 0 ,
, opt9 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt10 = [ 0 , 0 , 0 ,
, opt11 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt12 = [ 0 , 0 , 0
, opt13 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt14 = [ 0 , 0 , 0
, opt15 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ])
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.8 app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,
0,0,0], process_active=[0,0,0,0,0,0,0,0,0],
main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication. The link
signal interface between the controller and welder in the communication data sent to the welder from the robot
controller can be set. Enter the setting values below along with details based on the communication signal data
sheet of the corresponding welder.
Note
1. To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface
commands must be set up. app_weld_set_interface_eip_r2m_process(),
app_weld_set_interface_eip_r2m_mode(), app_weld_set_interface_eip_r2m_test(),
app_weld_set_interface_eip_r2m_condition(), app_weld_set_interface_eip_r2m_option(),
app_weld_set_interface_eip_m2r_process(), app_weld_set_interface_eip_m2r_monitoring(),
app_weld_set_interface_eip_m2r_other()
2. Start robot motion links with the current_flow signal from the welder but is linked with the
corresponding signal when the main_current item is set.
3. End robot motion links with the current_flow signal from the welder but is linked with the
corresponding signal when the process_active item is set.
Parameter
Parameter Name Data Type Default Description
Value
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 app_weld_set_interface_eip_m2r_process(current_flow = [ 1 , 0 , 0
, 0 , 0 , 0 , 1 , 0 , 0 ], process_active = [ 1 , 0 , 0 , 0 , 6 , 0 ,
, main_current = [ 1 , 0 , 0 , 0 , 5 , 0 , 1 , 0 , 0 ],
machine_ready = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
comm_ready = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ])
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.9 app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,
0,0,0,0,0,0,0], welding_current=[0,0,0,0,0,0,0,0,0],
wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication. This
sets the interface related to monitoring of the welding machine’s status setting in the communication data sent
to the welder from the robot controller. Enter the setting values below along with details based on the
communication signal data sheet of the corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
Parameter Name Data Type Default Description
Value
welding_voltage Refer to the Refer to the Actual Welding Voltage (specification for each welder)
table below table below
welding_current Actual Welding Current (specification for each welder)
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_set_interface_eip_m2r_monitoring(welding_voltage = [ 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], welding_current = [ 0 , 0 , 0 , 0 ,
, wire_feed_speed = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ],
wire_stick = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], error = [ 0 , 0 ,
, error_num = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ])
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
12.3.10 app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0],
opt2=[0,0,0,0,0,0,0,0,0], opt3=[0,0,0,0,0,0,0,0,0],
opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0],
opt6=[0,0,0,0,0,0,0,0,0], opt7=[0,0,0,0,0,0,0,0,0],...)
Features
This sets the communication interface setting to use welders that support EtherNet/IP communication.
Required functions other than basic setting items (app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other(),
app_weld_set_interface_eip_r2m_condition()) in the communication data sent to the robot controller from the
welder can be set with the corresponding command. Enter the setting values below along with details based on
the communication signal data sheet of the corresponding welder.
Note
To ensure proper welding using an EtherNet/IP remote control welder, all of 8 interface commands must
be set up.
app_weld_set_interface_eip_r2m_process(), app_weld_set_interface_eip_r2m_mode(),
app_weld_set_interface_eip_r2m_test(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option(), app_weld_set_interface_eip_m2r_process(),
app_weld_set_interface_eip_m2r_monitoring(), app_weld_set_interface_eip_m2r_other()
Parameter
Parameter Name Data Type Default Value Description
opt1 Specification
opt2 Specification
opt3 Specification
opt4 Specification
opt5 Specification
opt6 Specification
opt7 Specification
opt8 Specification
opt9 Specification
opt10 Specification
The data type, default value and description are identical to the below
0 Data Size
1-bit(disable Low): 0
1-bit(disable High): 1
2-bit: 2
4-bit: 3
8-bit(byte): 4
15-bit: 5
16-bit(short): 6
32-bit(int): 7
Note
For examples of data (0~2) interface settings, refer to the app_weld_set_interface_eip_r2m_process()
section.
Return
Value Description
0 Success
Exception
Exception Description
Example
1 app_weld_set_interface_eip_m2r_other(opt1 = [ 1 , 2 , 1 , 12 , 0 ,
6 , 15 , 0.0 , 25.5 ], opt2 = [ 1 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 ]
, opt3 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt4 = [ 0 , 0 , 0 ,
, opt5 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt6 = [ 0 , 0 , 0 ,
, opt7 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt8 = [ 0 , 0 , 0 ,
, opt9 = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], opt10 = [ 0 , 0 , 0 ,
)
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
Feature
This sets the welding condition of the remote control welders. It is only valid within the welding section defined
with the Enable Welding (app_weld_enable_digital()) and Disable Welding (app_weld_disable_digital())
commands, and any operations starting at a point outside the welding section will generate an error. Items that
can be set as welding conditions are welders corresponding to the following commands
(app_weld_set_interface_eip_r2m_mode(), app_weld_set_interface_eip_r2m_condition(),
app_weld_set_interface_eip_r2m_option()) and items that completed the communication interface setting.
Only one welding condition is allowed in a single welding section. This welding condition can be adjusted
during welding with the app_weld_adj_welding_cond_dgital() command while the voltage correction/dynamic
correction/feeding speed/speed (and weaving offset) can be also adjusted from the Welding Condition
Adjustment popup of the teaching pendant. However, from the teaching pendant, welding condition
adjustments are only available if the welding condition adjustment status is set to RESET using a command (the
welding condition setting is designated with app_weld_set_weld_cond_digital().
Note
1. Voltage Correction: Adjusts the length of the ark.
2. Dynamic Correction: Adjusts the ark property.
Parameter
Parameter Data Type Default Description
Name Value
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 app_weld_enable_digital()
2 app_weld_set_weld_cond_digital(flag_dry_run = 0 , vel_target = 16 ,
vel_min = 0.00 , vel_max = 16.67 , welding_mode = 3 , s_2t = 0 ,
pulse_mode = 0 , wm_opt1 = 0 , simulation = 0 , ts_opt1 = 0 ,
ts_opt2 = 0 , job_num = 4 , synergic_id = 0 , r_wire_feed_speed = 1
0 , voltage_correct = 0 , dynamic_correct = 0 , r_opt1 = 0 ,
r_opt2 = 0 , r_opt3 = 0 , r_opt4 = 0 , r_opt5 = 0 , r_opt6 = 0 ,
r_opt7 = 0 , r_opt8 = 0 , r_opt9 = 0 , r_opt10 = 0 , r_opt11 = 0 ,
r_opt12 = 0 , r_opt13 = 0 , r_opt14 = 0 , r_opt15 = 0 )
3 #Welding Speed=60 mm/sec (=1 cm/min), Welding Mode=3, Job
Number=4, Wire Feeding Speed=10 m/min
4
5 app_weld_disable_digital()
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
• app_weld_enable_digital()(p. 465)
• app_weld_set_weld_cond_digital(flag_dry_run=0, vel_target=0, vel_min=0, vel_max=0, welding_mode=0,
s_2t=0, pulse_mode=0, wm_opt1=0, simulation=0, ts_opt1=0, ts_opt2=0,...)(p. 498)
• app_weld_adj_welding_cond_digital(flag_reset=None, f_target=None, vel_target=None, wv_offset=None,
wv_width_ratio=None, dynamic_cor=None, voltage_cor=None, job_number=None, synergic_id=None)
(p. 503)
• app_weld_adj_welding_cond_digital(flag_reset=None, f_target=None, vel_target=None, wv_offset=None,
wv_width_ratio=None, dynamic_cor=None, voltage_cor=None, job_number=None, synergic_id=None)
(p. 503)
• app_weld_disable_digital()(p. 467)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
12.3.12 app_weld_adj_welding_cond_digital(flag_reset=None,
f_target=None, vel_target=None, wv_offset=None,
wv_width_ratio=None, dynamic_cor=None, voltage_cor=None,
job_number=None, synergic_id=None)
Features
This adjusts the welding condition and weaving condition during welding with a remote control welder. It is
used to change the welding condition of each section in a series of sections before calling the motion command
(movel(), movec(), moveb(), movesx()). If an adjustment factor is entered using this command, the
corresponding welding condition and weaving condition are adjusted, and real-time adjustment of the welding/
weaving condition from the welding monitoring information screen of the TP becomes unavailable. Execute
flag_reset=1 to reset the adjusted condition to the main condition set using app_weld_set_weld_cond_digital()
and app_weld_weave_cond_trapezoidal(). Setting flag_reset=1 will reset to the final condition adjusted in real-
time using the TP (the weaving width ratio (wv_width_ratio), which cannot be adjusted in real-time, is changed
to 1), and the welding condition can be adjusted in real-time from the TP.
Parameter
Parameter Name Data Type Default Description
Value
Note
Conditions which do not designate a value in factors vel_target/wv_offset/wv_width_ratio/
dynamic_cor/voltage_cor/job_number/synergic_id will maintain the current condition (including
conditions with real-time adjustments), so only set factors that require adjustment. However, in the case
of wv_offset, even if an adjustment is made only to the Y direction or Z direction, values for both
sequences must be entered.
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ),v = 30 ,a = 60 )
2
3
4
5 pt1 = posx( 559 , 434.5 , 651.5 , 45 , 180 , 45 )
6
7 pt2 = posx( 559 , 434.5 , 151.5 , 45 , 180 , 45 )
8
9 pt3 = posx( 559 , 0.0 , 151.5 , 45 , 180 , 45 )
10
11
12
13 app_weld_enable_digital()
14
15
16
17 app_weld_set_weld_cond_digital(flag_dry_run = 0 , vel_target = 16 ,
vel_min = 0.00 , vel_max = 16.67 , welding_mode = 3 , s_2t = 0 ,
pulse_mode = 0 , wm_opt1 = 0 , simulation = 0 , ts_opt1 = 0 ,
ts_opt2 = 0 , job_num = 4 , synergic_id = 0 , r_wire_feed_speed = 1
5 , voltage_correct = 0 , dynamic_correct = 0 , r_opt1 = 0 ,
r_opt2 = 0 , r_opt3 = 0 , r_opt4 = 0 , r_opt5 = 0 , r_opt6 = 0 ,
r_opt7 = 0 , r_opt8 = 0 , r_opt9 = 0 , r_opt10 = 0 , r_opt11 = 0 ,
r_opt12 = 0 , r_opt13 = 0 , r_opt14 = 0 , r_opt15 = 0 )
18
19
20
21 movel(pt1, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
22
23 app_weld_adj_welding_cond_digital(flag_reset = 0 , f_target = 10 ,
vel_target = 16 , wv_offset = [ 20 , 30 ], wv_width_ratio = 0.5 ,
24
25 dynamic_cor = 0 , voltage_cor = 0 , job_number = 5 , synergic_id = 4
26
27 movel(pt2, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
28
29 app_weld_adj_welding_cond_digital(flag_reset = 1 )
30
31 movel(pt3, v = 5 , a = 5 , app_type = DR_MV_APP_WELD)
32
33 # Start Point → pt1: Apply Initial Welding Condition Setting (Job
Number: 4, Synergic ID: 0, Feeding Speed: 15 m/min)
34
35 # pt1 → pt2: Apply Correction Condition (Job Number: 5, Synergic
ID: 4, Feeding Speed: 15 m/min)
36
37 # pt2 → pt3: Apply Initial Setting Apply Initial Welding
Condition Setting (Job Number: 4, Synergic ID: 0, Feeding Speed:
15 m/min)
38
39
40
41 app_weld_disable_digital()
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
• app_weld_enable_digital()(p. 465)
• app_weld_set_weld_cond_digital(flag_dry_run=0, vel_target=0, vel_min=0, vel_max=0, welding_mode=0,
s_2t=0, pulse_mode=0, wm_opt1=0, simulation=0, ts_opt1=0, ts_opt2=0,...)(p. 498)
• app_weld_adj_welding_cond_digital(flag_reset=None, f_target=None, vel_target=None, wv_offset=None,
wv_width_ratio=None, dynamic_cor=None, voltage_cor=None, job_number=None, synergic_id=None)
(p. 503)
• app_weld_disable_digital()(p. 467)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• movel()(p. 59)
• amovel()(p. 98)
• movec()(p. 68)
• amovec()(p. 104)
• moveb()(p. 81)
• amoveb()(p. 114)
• movesx()(p. 77)
• amovesx()(p. 111)
12.3.13 app_weld_get_welding_cond_digital()
Features
This monitors the welding status during welding with a remote control welder. Items available for monitoring
are voltage correction/dynamic correction/feeding speed/speed/weaving offset/error number/error status/wire
tip fusion/option and measured voltage/current/feeding speed and welding status. Signals other than the basic
monitoring items can be added. The corresponding signal must be preset using the interface
app_weld_set_interface_eip_m2r_other(). In addition, it is possible to check the fail status using the welding
status factor.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
voltage_cor Current Target Voltage Correction (V) (target with adjustment applied)
f_target Current Target Feeding Speed (m/min) (target with adjustment applied)
Value Description
wv_offset[2] Current Target Offset (Y and Z directions, mm) (target with adjustment applied)
Exception
Exception Description
Example
1 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ),v = 30 ,a = 60 )
2
3
4
5 pt1 = posx( 559 , 434.5 , 651.5 , 45 , 180 , 45 )
6
7 pt2 = posx( 559 , 434.5 , 151.5 , 45 , 180 , 45 )
8
9 pt3 = posx( 559 , 0.0 , 151.5 , 45 , 180 , 45 )
10
11
12
13 app_weld_enable_digital()
14
15
16
17 app_weld_set_weld_cond_digital(flag_dry_run = 1 , vel_target = 16 ,
vel_min = 0.00 , vel_max = 16.67 , welding_mode = 3 , s_2t = 0 ,
pulse_mode = 0 , wm_opt1 = 0 , simulation = 0 , ts_opt1 = 0 ,
ts_opt2 = 0 , job_num = 4 , synergic_id = 0 , r_wire_feed_speed = 1
5 , voltage_correct = 0 , dynamic_correct = 0 , r_opt1 = 0 ,
r_opt2 = 0 , r_opt3 = 0 , r_opt4 = 0 , r_opt5 = 0 , r_opt6 = 0 ,
r_opt7 = 0 , r_opt8 = 0 , r_opt9 = 0 , r_opt10 = 0 , r_opt11 = 0 ,
r_opt12 = 0 , r_opt13 = 0 , r_opt14 = 0 , r_opt15 = 0 )
18
19
20
21 movel(pt1, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
22
23 app_weld_adj_welding_cond_digital(flag_reset = 0 , f_target = 10 ,
vel_target = 16 , wv_offset = [ 20 , 30 ], wv_width_ratio = 0.5 ,
24
25 dynamic_cor = 0 , voltage_cor = 0 , job_number = 5 , synergic_id = 4
26
27 movel(pt2, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
28
29 app_weld_adj_welding_cond_digital(flag_reset = 1 )
30
31 amovel(pt3, v = 5 , a = 5 , app_type = DR_MV_APP_WELD)
32
33
34
35 [voltage_cor, dynamic_cor, f_target, vel_target, v_meas, c_meas,
wv_offset, status, f_meas, error_num, wire_stick,
36
37 error, opt1, opt2, opt3, opt4, opt5, opt6, opt7, opt8, opt9,
opt10, current_flow, process_active, machine_ready] = app_weld_get
_welding_cond_digital();
38
39
40
41 while True :
42
43 if status = = 9 :
44
45 tp_popup( "welding error!! " , DR_PM_ALARM, 1 )
46
47 # An alarm is generated if abnormal welding occurs (status=9)
48
49 else :
50
51 if check_motion() = = 0 :
52
53 break
54
55
56
57 app_weld_disable_digital()
Related commands
• app_weld_set_interface_eip_r2m_process(welding_start=[0,0,0,0,0,0,0,0,0],
robot_ready=[0,0,0,0,0,0,0,0,0], error_reset=[0,0,0,0,0,0,0,0,0])(p. 469)
• app_weld_set_interface_eip_r2m_mode(welding_mode=[0,0,0,0,0,0,0,0,0], s_2t=[0,0,0,0,0,0,0,0,0],
pulse_mode=[0,0,0,0,0,0,0,0,0],wm_opt1=[0,0,0,0,0,0,0,0,0])(p. 474)
• app_weld_set_interface_eip_r2m_test(gas_test=[0,0,0,0,0,0,0,0,0], inching_plus=[0,0,0,0,0,0,0,0,0],
inching_minus=[0,0,0,0,0,0,0,0,0], blow_out_torch=[0,0,0,0,0,0,0,0,0], simulation=[0,0,0,0,0,0,0,0,0],
ts_opt1=[0,0,0,0,0,0,0,0,0], ...)(p. 477)
• app_weld_set_interface_eip_r2m_condition(job_num=[0,0,0,0,0,0,0,0,0], synergic_id=[0,0,0,0,0,0,0,0,0],
r_wire_feed_speed=[0,0,0,0,0,0,0,0,0], voltage_corret=[0,0,0,0,0,0,0,0.0,0.0],
dynamic_correct=[0,0,0,0,0,0,0,0,0])(p. 480)
• app_weld_set_interface_eip_r2m_option(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],...)(p. 483)
• app_weld_set_interface_eip_m2r_process(current_flow=[0,0,0,0,0,0,0,0,0],
process_active=[0,0,0,0,0,0,0,0,0], main_current=[0,0,0,0,0,0,0,0,0], machine_ready=[0,0,0,0,0,0,0,0,0],
comm_ready=[0,0,0,0,0,0,0,0,0])(p. 487)
• app_weld_set_interface_eip_m2r_monitoring(welding_voltage=[0,0,0,0,0,0,0,0,0],
welding_current=[0,0,0,0,0,0,0,0,0], wire_feed_speed=[0,0,0,0,0,0,0,0,0], wire_stick=[0,0,0,0,0,0,0,0,0],
error=[0,0,0,0,0,0,0,0,0], ...)(p. 491)
• app_weld_set_interface_eip_m2r_other(opt1=[0,0,0,0,0,0,0,0,0], opt2=[0,0,0,0,0,0,0,0,0],
opt3=[0,0,0,0,0,0,0,0,0], opt4=[0,0,0,0,0,0,0,0,0], opt5=[0,0,0,0,0,0,0,0,0], opt6=[0,0,0,0,0,0,0,0,0],
opt7=[0,0,0,0,0,0,0,0,0],...)(p. 494)
• app_weld_enable_digital()(p. 465)
• app_weld_set_weld_cond_digital(flag_dry_run=0, vel_target=0, vel_min=0, vel_max=0, welding_mode=0,
s_2t=0, pulse_mode=0, wm_opt1=0, simulation=0, ts_opt1=0, ts_opt2=0,...)(p. 498)
• app_weld_adj_welding_cond_digital(flag_reset=None, f_target=None, vel_target=None, wv_offset=None,
wv_width_ratio=None, dynamic_cor=None, voltage_cor=None, job_number=None, synergic_id=None)
(p. 503)
• app_weld_disable_digital()(p. 467)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• movel()(p. 59)
• amovel()(p. 98)
• movec()(p. 68)
• amovec()(p. 104)
• moveb()(p. 81)
• amoveb()(p. 114)
• movesx()(p. 77)
• amovesx()(p. 111)
Features
This enables the analog welding function. It enters the connection and environment information of the
available welding machine’s analog I/O and digital signal output as input factors.
The target welding machine must support an analog interface so it can receive target current and target voltage
inputs from the analog output channel of the connected controller. Set the channel number (1 or 2) and output
mode (current/voltage) of the physically connected analog channel in ch_v_out and ch_f_out. The analog
input/output range of the controller is 0-10 V for voltage mode and 4-20 mA for current mode. Make sure to set
the mode and output range of each channel to be compatible with the input specification and range of the
welding machine. For example, if the target input range of the welding machine is 0-10 V, it is ideal to set the
output channel of the controller as voltage mode (0-10 V output range). Another example would be if the input
channel specification of the welding machine is 2-15 V. In this case, set the analog channel current mode (4-20
mA output range) on the corresponding controller and connect a 75 ohm resistance to output a 3-15 V voltage.
(In this case, the 2-3 V range, which cannot be set using the controller, cannot set a target.) It is recommended
that the welding machine be set with as large an input range as possible.
Set the maximum and minimum range of the controller analog output in spec_v_out and spec_f_out.
Where, WO_min and WO_max are the minimum and maximum output of the welder, and CO_min and CO_max
are the controller analog output corresponding to WO_min and WO_max.
Note
The welding current varies according to the wire feeding speed, basic material, material/type/stick-out
of the welding wire, and welding voltage, and this must be monitored with the welding machine or a
separate current sensor.
In order to monitor the voltage/current measurements during welding, it is necessary to connect an analog
output welding machine or a separate sensor. Set the analog input channel number and input mode of the
corresponding controller in ch_v_in and ch_c_in.
Set the maximum and minimum input range of sensor measured in spec_v_in and spec_f_in.
Where, SO_min and SO_max are the minimum and maximum sensor, and CI_min and CI_max are the controller
input corresponding to SO_min and SO_max.
Set the channel numbers for ARC-ON/OFF (gas output signal - start/end), GAS-ON/OFF (gas output signal - start/
end), INCHING-Forward-ON/OFF (forward wire feed signal - start/end), INCHING-Backward-ON/OFF (backward
wire feed signal - start/end), and BlowOut-ON/OFF (torch cleaning gas output signal - start/end), which connect
to the welding machine using digital contact method. In the case of signal outputs other than the ARC-ON/OFF
signal, enter them selectively, depending on whether the welding machine supports the corresponding
function.
Parameter
Parameter Data Type Default Description
Name Value
ch_inching_bw int 4 Welding Wire Reverse Stick-Out Digital Output Channel (1-16)
d
If no connection is present: 0
Return
Value Description
Exception
Exception Description
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2
3 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
4
5 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
6
7
8
9 # Voltage Output (Channel 1, Voltage Mode), Welder Voltage
Specification (Min/Max)=(0-300)
10
11 # Feeding Speed Output (Channel 2, Voltage Mode), Feeding Speed
Specification (Min/Max)=(0-40)
12
13 # Voltage Sensing (Channel 1, Voltage Mode), Sensor Measurement
Specification (Min/Max)=(0-300)
14
15 # Current Sensing (Channel 2, Voltage Mode), Sensor Specification
(Min/Max)=(0-40)
16
17 # Start Welding Signal (Channel 1), Gas Output Signal (Channel 2),
Wire Forward Stick-Out Signal (Channel 3),
18
19 # Wire Reverse Stick-Out Signal (Channel 4), Torch Cleaning Gas
Output Signal (Channel 5)
20
21 app_weld_disable_analog()
Related commands
• app_weld_enable_analog(ch_v_out=[1,0], spec_v_out=[0,0,0,0], ch_f_out=[2,0], spec_f_out=[0,0,0,0],
ch_v_in=[1,0], spec_v_in=[0,0,0,0], ch_c_in=[2,0],
spec_c_in=[0,0,0,0],ch_arc_on=1,ch_gas_on=2,ch_inching_fwd=3,ch_inching_bwd=4, ...)(p. 512)
• app_weld_set_weld_cond_analog(flag_dry_run=0, v_target=0, f_target=0, vel_target=0, vel_min=0,
vel_max=0, weld_proc_param=[0.2,0.2,0.5,0.5,0.5,0.2,0.2,0.5,0.5])(p. 519)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• app_weld_adj_welding_cond_analog(flag_reset=0, v_target=None, f_target=None, vel_target=None,
wv_offset=None, wv_width_ratio=None)(p. 523)
• app_weld_get_welding_cond_analog()(p. 526)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
12.3.15 app_weld_disable_analog()
Features
This disables the analog welding function.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
3 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
4
5 app_weld_disable_analog()
Related commands
• app_weld_enable_analog(ch_v_out=[1,0], spec_v_out=[0,0,0,0], ch_f_out=[2,0], spec_f_out=[0,0,0,0],
ch_v_in=[1,0], spec_v_in=[0,0,0,0], ch_c_in=[2,0],
spec_c_in=[0,0,0,0],ch_arc_on=1,ch_gas_on=2,ch_inching_fwd=3,ch_inching_bwd=4, ...)(p. 512)
• app_weld_set_weld_cond_analog(flag_dry_run=0, v_target=0, f_target=0, vel_target=0, vel_min=0,
vel_max=0, weld_proc_param=[0.2,0.2,0.5,0.5,0.5,0.2,0.2,0.5,0.5])(p. 519)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• app_weld_adj_welding_cond_analog(flag_reset=0, v_target=None, f_target=None, vel_target=None,
wv_offset=None, wv_width_ratio=None)(p. 523)
• app_weld_get_welding_cond_analog()(p. 526)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
Features
This sets the analog welding condition. It is only valid within the welding section defined with the Enable
Welding (app_weld_enable_analog()) and Disable Welding (app_weld_disable_analog()) commands, and any
operations starting at a point outside the welding section will generate an error. The Welding Parameter
(weld_proc_param) of the welding condition displays detailed conditions, including gas during start/end
welding and condition maintenance time. Refer to the figure below for the values to enter. Only one welding
condition is allowed in a single welding section. This welding condition can be adjusted during welding with the
app_weld_adj_welding_cond_analog() command while the voltage/feeding speed/speed (and weaving offset)
can be also adjusted from the Welding Condition Adjustment popup of the teaching pendant. However, from
the teaching pendant, welding condition adjustments are only available if the welding condition adjustment
status is set to RESET using a command (the welding condition setting is designated with
app_weld_set_weld_cond_analog()).
Note
The welding current varies according to the wire feeding speed, basic material, material/type/stick-out
of the welding wire, and welding voltage, and this must be monitored with the welding machine or a
separate current sensor.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2
3 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
4
5 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
6
7
8
9 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 24 ,
f_target = 20 , vel_target = 60 , vel_min = 10 ,
10
11 vel_max = 100 , weld_proc_param = [ 0.2 , 0.2 , 0.5 , 0.5 , 0.5 , 0
.2 , 0.2 , 0.5 , 0.5 ])
12
13 # Target Voltage/Feeding Speed = 24 V, 20 m/min, Welding Speed=60
mm/sec (=1 cm/min), Actual Welding, Use Default Welding Parameter
14
15 app_weld_disable_analog()
Related commands
• app_weld_enable_analog(ch_v_out=[1,0], spec_v_out=[0,0,0,0], ch_f_out=[2,0], spec_f_out=[0,0,0,0],
ch_v_in=[1,0], spec_v_in=[0,0,0,0], ch_c_in=[2,0],
spec_c_in=[0,0,0,0],ch_arc_on=1,ch_gas_on=2,ch_inching_fwd=3,ch_inching_bwd=4, ...)(p. 512)
• app_weld_set_weld_cond_analog(flag_dry_run=0, v_target=0, f_target=0, vel_target=0, vel_min=0,
vel_max=0, weld_proc_param=[0.2,0.2,0.5,0.5,0.5,0.2,0.2,0.5,0.5])(p. 519)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• app_weld_adj_welding_cond_analog(flag_reset=0, v_target=None, f_target=None, vel_target=None,
wv_offset=None, wv_width_ratio=None)(p. 523)
• app_weld_get_welding_cond_analog()(p. 526)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
Features
This adjusts the welding condition and weaving condition during analog welding. It is used to change the
welding condition of each section in a series of sections before calling the motion command (movel(), movec(),
moveb(), movesx()). If an adjustment factor is entered using this command, the corresponding welding
condition and weaving condition are adjusted, and real-time adjustment of the welding/weaving condition
from the welding monitoring information screen of the TP becomes unavailable. Execute flag_reset=1 to reset
the adjusted condition to the main condition set using app_weld_set_weld_cond_analog() and
app_weld_weave_cond_trapezoidal(). Setting flag_reset=1 will reset to the final condition adjusted in real-time
using the TP (the weaving width ratio (wv_width_ratio), which cannot be adjusted in real-time, is changed to 1),
and the welding condition can be adjusted in real-time from the TP.
Parameter
Parameter Name Data Type Default Description
Value
Note
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ),v = 30 ,a = 60 )
2
3
4
5 pt1 = posx( 559 , 434.5 , 651.5 , 45 , 180 , 45 )
6
7 pt2 = posx( 559 , 434.5 , 151.5 , 45 , 180 , 45 )
8
9 pt3 = posx( 559 , 0.0 , 151.5 , 45 , 180 , 45 )
10
11
12
13 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
14
15 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
16
17 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 ,
18
19 ch_inching_bwd = 4 , ch_blow_out = 5 )
20
21
22
23 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 24 ,
f_target = 20 , vel_target = 60 , vel_min = 10 ,
24
25 vel_max = 100 , weld_proc_param = [ 0.2 , 0.2 , 0.5 , 0.5 , 0.5 , 0
.2 , 0.2 , 0.5 , 0.5 ])
26
27
28
29 movel(pt1, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
30
31 app_weld_adj_welding_cond_analog(flag_reset = 0 , v_target = 20 ,
f_target = 10 , vel_target = 30 , wv_offset = [ 20 , 10 ],
wv_width_ratio = 0.5 )
32
33 movel(pt2, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
34
35 app_weld_adj_welding_cond_analog(flag_reset = 1 )
36
37 movel(pt3, v = 5 , a = 5 , app_type = DR_MV_APP_WELD)
38
39 # Start Point → pt1: Apply Origin Welding Condition (24V, 20 m/
min)
40
41 # pt1 → pt2: Apply Adjusted Condition (20 V, 10 m/min)
42
43 # pt2 → pt3: Apply Origin Condition (24 V, 20 m/min)
44
45
46
47 app_weld_disable_analog()
Related commands
• app_weld_enable_analog(ch_v_out=[1,0], spec_v_out=[0,0,0,0], ch_f_out=[2,0], spec_f_out=[0,0,0,0],
ch_v_in=[1,0], spec_v_in=[0,0,0,0], ch_c_in=[2,0],
spec_c_in=[0,0,0,0],ch_arc_on=1,ch_gas_on=2,ch_inching_fwd=3,ch_inching_bwd=4, ...)(p. 512)
• app_weld_set_weld_cond_analog(flag_dry_run=0, v_target=0, f_target=0, vel_target=0, vel_min=0,
vel_max=0, weld_proc_param=[0.2,0.2,0.5,0.5,0.5,0.2,0.2,0.5,0.5])(p. 519)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• app_weld_adj_welding_cond_analog(flag_reset=0, v_target=None, f_target=None, vel_target=None,
wv_offset=None, wv_width_ratio=None)(p. 523)
• app_weld_get_welding_cond_analog()(p. 526)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• movel()(p. 59)
• amovel()(p. 98)
• movec()(p. 68)
• amovec()(p. 104)
• moveb()(p. 81)
• amoveb()(p. 114)
• movesx()(p. 77)
• amovesx()(p. 111)
12.3.18 app_weld_get_welding_cond_analog()
Features
This monitors the welding status during analog welding. Values available for monitoring are the current target
voltage/current/speed/weaving offset/digital output signal and measured voltage/current and welding status. If
measured voltage/current is not set (if ch_v_in and ch_c_in are not set during app_weld_enable()), the output
of the corresponding values are set equal to the target voltage (v_target)/current (c_target). In addition, it is
possible to check the fail status using the welding status factor.
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
f_target Current Target Feeding Speed (m/min) (target with adjustment applied)
wv_offset[2] Current Target Offset (Y and Z directions, mm) (target with adjustment applied)
Exception
Exception Description
Example
1 movej(posj( 0 , 0 , 90 , 0 , 90 , 0 ),v = 30 ,a = 60 )
2
3
4
5 pt1 = posx( 559 , 434.5 , 651.5 , 45 , 180 , 45 )
6
7 pt2 = posx( 559 , 434.5 , 151.5 , 45 , 180 , 45 )
8
9 pt3 = posx( 559 , 0.0 , 151.5 , 45 , 180 , 45 )
10
11
12
13 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
14
15 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
16
17 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 ,
18
19 ch_inching_bwd = 4 , ch_blow_out = 5 )
20
21
22
23 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 24 ,
f_target = 20 , vel_target = 60 , vel_min = 10 ,
24
25 vel_max = 100 , weld_proc_param = [ 0.2 , 0.2 , 0.5 , 0.5 , 0.5 , 0
.2 , 0.2 , 0.5 , 0.5 ])
26
27
28
29 movel(pt1, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
30
31 app_weld_adj_welding_cond_analog(flag_reset = 0 , v_target = 20 ,
f_target = 10 , vel_target = 30 , wv_offset = [ 20 , 10 ],
wv_width_ratio = 0.5 )
32
33 movel(pt2, v = 5 , a = 5 , r = 30 , app_type = DR_MV_APP_WELD)
34
35 app_weld_adj_welding_cond_analog(flag_reset = 1 )
36
37 amovel(pt3, v = 5 , a = 5 , app_type = DR_MV_APP_WELD)
38
39
40
41 while True :
42
Related commands
• app_weld_enable_analog(ch_v_out=[1,0], spec_v_out=[0,0,0,0], ch_f_out=[2,0], spec_f_out=[0,0,0,0],
ch_v_in=[1,0], spec_v_in=[0,0,0,0], ch_c_in=[2,0],
spec_c_in=[0,0,0,0],ch_arc_on=1,ch_gas_on=2,ch_inching_fwd=3,ch_inching_bwd=4, ...)(p. 512)
• app_weld_set_weld_cond_analog(flag_dry_run=0, v_target=0, f_target=0, vel_target=0, vel_min=0,
vel_max=0, weld_proc_param=[0.2,0.2,0.5,0.5,0.5,0.2,0.2,0.5,0.5])(p. 519)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
• app_weld_adj_welding_cond_analog(flag_reset=0, v_target=None, f_target=None, vel_target=None,
wv_offset=None, wv_width_ratio=None)(p. 523)
• app_weld_get_welding_cond_analog()(p. 526)
• app_weld_weave_cond_trapezoidal(wv_offset=[0,0], wv_ang=0,
wv_param=[0,1.5,0,-1.5,0.3,0.1,0.3,0.3,0.1,0.3])(p. 530)
• app_weld_weave_cond_zigzag(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 532)
• app_weld_weave_cond_circular(wv_offset=[0,0], wv_ang=0, wv_param=[3,3,0.3,0.3])(p. 535)
• app_weld_weave_cond_sinusoidal(wv_offset=[0,0], wv_ang=0, wv_param=[3,0.6])(p. 537)
Features
This sets the trapezoidal weaving condition. It is only valid within the welding section defined with the Enable
Welding (app_weld_enable_analog()) and Disable Welding (app_weld_disable_analog()/
app_weld_disable_digital()) commands, and any operations starting at a point outside the welding section will
generate an error. The weaving condition is defined by the weaving coordinates, which are defined with the TCP
direction from the weaving x-axis as the weaving z-axis, and the vector-multiplied (cross product) direction as
the weaving y-axis with the welding path direction as the weaving x-axis. Refer to the figure below for the
coordinates and weaving setting factor. Only one weaving condition is allowed in a single welding section. The
offset or weaving width can be adjusted during welding with the app_weld_adj_welding_cond_analog()/
app_weld_set_weld_cond_digital() command or the voltage/current/speed and the offset can be adjusted from
the Welding Condition Adjustment popup of the teaching pendant. However, from the teaching pendant,
welding condition adjustments are only available if the welding condition adjustment status is set to RESET
using a command (the welding condition setting is designated with app_weld_set_weld_cond_analog()/
app_weld_set_weld_cond_digital()).
Parameter
Parameter Data Type Default Description
Name Value
Return
Value Description
0 Setting Success
Exception
Exception Description
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
3 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
4
5 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 200 ,
f_target = 150 , vel_target = 10 , vel_min = 10 ,
6 vel_max = 100 , weld_proc_param = [ 0.5 , 0.3 , 2 , 1 , 0.7 , 0.4 , 0
.7 , 0.6 , 1.5 ])
7
8 app_weld_weave_cond_trapezoidal(wv_offset = [ 0 , 0 ], wv_ang = 0 ,
wv_param = [ 0 , 5 , 0 , - 5 , 0.7 , 0.2 , 0.5 , 0.7 , 0.2 , 0.5 ]
)
9
10 # Trapezoidal Weaving Pattern, Offset=0,0, Tilt Angle=0, Weaving
Point 1=(0,5), Weaving Point 2=(0,-5), Weaving Time=0.7 (sec)
(same in both directions), Weaving Dec/Acc Time=0.2 (sec) (same in
both directions), Weaving Point 1 Dwell Time=0.5 sec, Weaving
Point 2 Dwell Time=0.5 sec
11 app_weld_disable_analog ()
Features
This sets the zigzag weaving condition. It is only valid within the welding section defined with the Enable
Welding (app_weld_enable_analog()) and Disable Welding (app_weld_disable_analog()/
app_weld_disable_digital()) commands, and any operations starting at a point outside the welding section will
generate an error. The weaving condition is defined by the weaving coordinates, which are defined with the TCP
direction from the weaving x-axis as the weaving z-axis, and the vector-multiplied (cross product) direction as
the weaving y-axis with the welding path direction as the weaving x-axis. Refer to the figure below for the
coordinates and weaving setting factor. Only one weaving condition is allowed in a single welding section. The
offset or weaving width can be adjusted during welding with the app_weld_adj_welding_cond_analog()/
app_weld_set_weld_cond_digital() command or the voltage/current/speed and the offset can be adjusted from
the Welding Condition Adjustment popup of the teaching pendant. However, from the teaching pendant,
welding condition adjustments are only available if the welding condition adjustment status is set to RESET
using a command (the welding condition setting is designated with app_weld_set_weld_cond_analog()/
app_weld_set_weld_cond_digital()).
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2
3 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
4
5 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
6
7
8
9 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 200 ,
f_target = 150 , vel_target = 10 , vel_min = 10 ,
10
11 vel_max = 100 , weld_proc_param = [ 0.5 , 0.3 , 2 , 1 , 0.7 , 0.4 , 0
.7 , 0.6 , 1.5 ])
12
13
14
15 app_weld_weave_cond_zigzag(wv_offset = [ 0 , 0 ], wv_ang = 0 ,
wv_param = [ 10 , 0.5 ])
16
17 # Zigzag Weaving Pattern, Offset=0,0 Tilt Angle=0, Weaving
Width=10 (mm), Weaving Period=0.5 (sec)
18
19 app_weld_disable_analog()
Features
This sets the circular weaving condition. It is only valid within the welding section defined with the Enable
Welding (app_weld_enable_analog()) and Disable Welding (app_weld_disable_analog()/
app_weld_disable_digital()) commands, and any operations starting at a point outside the welding section will
generate an error. The weaving condition is defined by the weaving coordinates, which are defined with the TCP
direction from the weaving x-axis as the weaving z-axis, and the vector-multiplied (cross product) direction as
the weaving y-axis with the welding path direction as the weaving x-axis. Refer to the figure below for the
coordinates and weaving setting factor. Only one weaving condition is allowed in a single welding section. The
offset or weaving width can be adjusted during welding with the app_weld_adj_welding_cond_analog()/
app_weld_set_weld_cond_digital() command or the voltage/current/speed and the offset can be adjusted from
the Welding Condition Adjustment popup of the teaching pendant. However, from the teaching pendant,
welding condition adjustments are only available if the welding condition adjustment status is set to RESET
using a command (the welding condition setting is designated with app_weld_set_weld_cond_analog()/
app_weld_set_weld_cond_digital()).
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
3 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
4
5 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 200 ,
f_target = 150 , vel_target = 10 , vel_min = 10 ,
6 vel_max = 100 , weld_proc_param = [ 0.5 , 0.3 , 2 , 1 , 0.7 , 0.4 , 0
.7 , 0.6 , 1.5 ])
7
8 app_weld_weave_cond_circular(wv_offset = [ 0 , 0 ], wv_ang = 0 ,
wv_param = [ 3 , 3 , 0.3 , 0.3 ])
9 # Circular Weaving Pattern, Offset=0,0 Tilt Angle=0, X Direction
Weaving Width=3 (mm), Y Direction Weaving=3 (mm), X Direction
Weaving Period=0.3 (s), Y Direction Weaving Period=0.3 (s)
10 app_weld_disable_analog()
Features
This sets the sinusoidal weaving condition. It is only valid within the welding section defined with the Enable
Welding (app_weld_enable_analog()) and Disable Welding (app_weld_disable_analog()/
app_weld_disable_digital()) commands, and any operations starting at a point outside the welding section will
generate an error. The weaving condition is defined by the weaving coordinates, which are defined with the TCP
direction from the weaving x-axis as the weaving z-axis, and the vector-multiplied (cross product) direction as
the weaving y-axis with the welding path direction as the weaving x-axis. Refer to the figure below for the
coordinates and weaving setting factor. Only one weaving condition is allowed in a single welding section. The
offset or weaving width can be adjusted during welding with the app_weld_adj_welding_cond_analog()/
app_weld_set_weld_cond_digital() command or the voltage/current/speed and the offset can be adjusted from
the Welding Condition Adjustment popup of the teaching pendant. However, from the teaching pendant,
welding condition adjustments are only available if the welding condition adjustment status is set to RESET
using a command (the welding condition setting is designated with app_weld_set_weld_cond_analog()/
app_weld_set_weld_cond_digital()).
Parameter
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Setting Success
Exception
Exception Description
Example
1 app_weld_enable_analog(ch_v_out = [ 1 , 1 ], spec_v_out = [ 0 , 0 , 3
00 , 10 ], ch_f_out = [ 2 , 1 ],
2
3 spec_f_out = [ 0 , 0 , 40 , 10 ], ch_v_in = [ 1 , 1 ], spec_v_in
= [ 0 , 0 , 300 , 10 ], ch_c_in = [ 2 , 1 ],
4
5 spec_c_in = [ 0 , 0 , 40 , 10 ], ch_arc_on = 1 , ch_gas_on = 2 ,
ch_inching_fwd = 3 , ch_inching_bwd = 4 , ch_blow_out = 5 )
6
7
8
9 app_weld_set_weld_cond_analog(flag_dry_run = 1 , v_target = 200 ,
f_target = 150 , vel_target = 10 , vel_min = 10 ,
10
11 vel_max = 100 , weld_proc_param = [ 0.5 , 0.3 , 2 , 1 , 0.7 , 0.4 , 0
.7 , 0.6 , 1.5 ])
12
13
14
15 app_weld_weave_cond_sinusoidal(wv_offset = [ 0 , 0 ], wv_ang = 0 ,
wv_param = [ 10 , 0.5 ])
16
17 # Sinusoidal Weaving Pattern, Offset=0,0 Tilt Angle=0, Weaving
Width=10 (mm), Weaving Period=0.5 (s)
18
19 app_weld_disable_analog()
13 A-Series Command
13.1 Controller
13.1.1 get_function_input(index)
Features
This function reads a state of the function button from the process button device.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
1 ON
0 OFF
Exception
Exception Description
Exception Description
Example
Features
A command used for opening the Pseudo Flange Serial communication port.
The characteristics of pseudo flange serial communication are different from normal serial communication.
Therefore, handshaking communication is recommended. (e.g., modbus RTU) Due to the internal buffer size
limit (255bytes) and internal delay, overflow may occur when used in sensors, etc.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Successful connection
Exception
Exception Description
13.2.2 flange_serial_close()
Features
This function closes a flange serial communication port.
Return
Value Description
0 Success
Exception
Exception Description
13.2.3 flange_serial_write(tx_data)
Features
This function records the data (data) to a flange serial port.
Parameters
Parameter Name Data Type Default Description
Value
Return
Value Description
0 Success
Exception
Exception Description
13.2.4 flange_serial_read(timeout=None)
Features
This function reads the data from a flange serial port.
Return
Value Description
Exception
Exception Description
Exception Description
Example : robotiq 2f
1 Def recv_data():
2 Res, data = flange_serial_read( 3 ) #timeout 3s
3 If res = = - 1 :
4 #Exception Handling Required
5 tp_log(“Response time out!!”)
6 elif res = = - 2
7 #Exception Handling Required
8 tp_log(“ Buffer Overflow!!”)
9 else :
10 if Modbus_recv_check(data) = = True :
11 tp_log(“recv size [“ + str (res) + ”] :” + str (data))
12 else
13 #Exception Handling Required
14 tp_log(“CRC Check Fail!!”)
15
16 flange_serial_open(baudrate = 115200 , bytesize = DR_EIGHTBITS,
parity = DR_PARITY_NONE, stopbits = DR_STOPBITS_ONE)
17 wait( 0.1 )
18
19 #Step1:Activation Request(clear Act)
20 flange_serial_write(modbus_send_make(b
"\x09\x10\x03\xE8\x00\x03\x06\x00\x00\x00\x00\x00\x00" ))
21 res, data = flange_serial_read()
22
23 #Step1:Activation Request(set Act)
24 flange_serial_write(modbus_send_make(b
"\x09\x10\x03\xE8\x00\x03\x06\x01\x00\x00\x00\x00\x00" ))
25 res, data = flange_serial_read()
26
27 #Step 2: Read Gripper status until the activation is completed
28 flange_serial_write(modbus_send_make(b "\x09\x03\x07\xD0\x00\x01"
))
29 res, data = flange_serial_read()
30
31 #Step 3: Move the robot to the pick-up location
32 wait( 1 )
33
34 #Step 4: Close the Gripper at full speed and full force
35 flange_serial_write(modbus_send_make(b
"\x09\x10\x03\xE8\x00\x03\x06\x09\x00\x00\xFF\xFF\xFF" ))
36 res, data = flange_serial_read()
37
38 #Step 5: Read Gripper status until the grasp is completed
39 flange_serial_write(modbus_send_make(b "\x09\x03\x07\xD0\x00\x03"
))
40 res, data = flange_serial_read()
41
42 #Step 6: Move the robot to the release location
43 wait( 1 )
44
45 #Step 7: Open the Gripper at full speed and full force
46 flange_serial_write(modbus_send_make(b
"\x09\x10\x03\xE8\x00\x03\x06\x09\x00\x00\x00\xFF\xFF" ))
47 res, data = flange_serial_read()
48
49 #Step 8: Read Gripper status until the opening is completed
50 flange_serial_write(modbus_send_make(b "\x09\x03\x07\xD0\x00\x03"
))
51 res, data = flange_serial_read()
52
53 flange_serial_close()