Skip to main content
Skip table of contents

Run Thread Command

Overview

The Run Thread Command helps to create and execute a thread. The features executed by the thread are determined by the functions specified in th_func_name.

Property

Annotation

You can insert text in the description, unique meaning, or nickname for each Parameter to differentiate from 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 parameter, please refer to the following online manual link: https://manual.doosanrobotics.com/help/programming/2.9/publish/en_us/thread_run-th_func_name-loop-false-8427370.html.

Parameter Name

Data Type

Default Value

Description

th_func_name

callable

-

Name of the function run by the thread

loop

bool

False

Flag indicates whether the thread will be repeated

  • True: Repeated calling of th_func_name
    (interval 0.01second)

  • False: One-time calling of th_func_name

Example

DRL Code

PY
#----- Thread -------------------------------------- 
def fn_th_func():
	if check_motion()==0:	# No motion in action
		set_digital_output(1, OFF)
	else:
		set_digital_output(1, ON)

#----- Main routine ----------------------------------
th_id = thread_run(fn_th_func, loop=True) # Thread run

while 1: 
	# do something…
	wait(0.1)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.