User Input Command
Overview
User Input Command is the command that can help the robot to receive the user input data through the Teach Pendant.
Property
Annotation
You can insert text in the description, unique meaning, or nickname for each Parameter to differentiate with many DRL Components.
Parameters
In Parameter Panel, it will help you create or select your variable to define the parameter of the chosen command.
For detailed DRL description other than parameters, please refer to the following online manual link: https://manual.doosanrobotics.com/help/programming/2.9/publish/en_us/tp_get_user_input-message-input_type-8427358.html.
Parameter Name | Data Type | Default Value | Description |
message | string | - | Character string message to be displayed on the TP user input window
|
input_type | int | - | TP user input message type
|
Example
DRL Code
q1 = posj(10, 10, 10, 10, 10, 10)
q2 = posj(20, 20, 20, 20, 20, 20)
q3 = posj(30, 30, 30, 30, 30, 30)
q4 = posj(40, 40, 40, 40, 40, 40)
q5 = posj(50, 50, 50, 50, 50, 50)
q6 = posj(60, 60, 60, 60, 60, 60)
int_y= tp_get_user_input("message1", input_type= DR_VAR_INT)
if int_y==1: # Moves to q1 if the TP user input is 1.
movej(q1, vel=30, acc=30)
else: # Moves to q2 if the TP user input is not 1.
movej(q2, vel=30, acc=30)
float_y= tp_get_user_input("message2", input_type= DR_VAR_FLOAT)
if float_y==3.14: # Moves to q3 if the TP user input is 3.14.
movej(q3, vel=30, acc=30)
else: # Moves to q4 if the TP user input is not 3.14.
movej(q4, vel=30, acc=30)
str_y= tp_get_user_input("message3", input_type= DR_VAR_STR)
if str_y=="a": # Moves to q5 if the TP user input is "a".
movej(q5, vel=30, acc=30)
else: # Moves to q6 if the TP user input is not "a".
movej(q6, vel=30, acc=30)
bool_y= tp_get_user_input("message3", input_type= DR_VAR_BOOL)
if bool_y==True: # Moves to q5 if the TP user input is "True or 1".
movej(q5, vel=30, acc=30)
else: # Moves to q6 if the TP user input is "False or 0"
movej(q6, vel=30, acc=30)
Block code
Info
Refer to this link Mode Selectionto understand more about DRL and Block Coding.