Breadcrumbs

tp_log()

Definition

tp_log(message)

Features

This function records the user-written log to the Teach Pendant.

Caution

  • Excessive use of TP_LOG or SET commands within loops may cause CPU overload.

Parameters

Parameter Name

Data Type

Default Value

Description

message

string

-

Log message

  • Messages are limited to within 256 bytes.

  • It is recommended that the text be concise. For long text, some content is omitted with an ellipsis (…).

  • Formatting-related code such as newline (\n) or carriage return (\r) is not allowed.

Return

Value

Description

0

Success

Negative value

Failed

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

Python
tp_log("movej() is complete!")