Skip to main content
Skip table of contents

Kill Thread Command

Overview

The Kill Thread Command helps to terminate a thread.

The program is automatically terminated when the DRL program is terminated, even if the thread_stop() command is not used.

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_stop-th_id-8427373.html.

Parameter Name

Data Type

Default Value

Description

th_id

int

-

Thread ID to stop

Example

DRL Code

PY
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)

# do something…
thread_stop(th_id) # Stops the thread.
JavaScript errors detected

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

If this problem persists, please contact our support.