SetTargetColor (Method)

Overview

Type:

Method

Available as of:

V1.1.0.0

Task

Setting the color of a target.

Description

The method SetTargetColor modifies the color of the specified target.

The event is written to the internal events buffer and to the OPC UA structure by the method Update.

Interface

Input

Data type

Description

i_udiTargetId

UDINT

ID of the target whose color is to be modified. The ID must be unique.

i_etColorId

ET_EmulationColors

The color configured for the target.

The default value is GPL.Gc_etDefaultTargetColor.

Output

Data type

Description

q_xError

BOOL

Indicates TRUE if an error has been detected. For details, refer to q_etResult and q_sResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information as a numeric value.
If q_xError = FALSE, q_etResult provides status information.
If q_xError = TRUE, q_etResult provides diagnostic/error information.

q_sResultMsg

STRING [80]

Provides additional diagnostic and status information as a text message.

Diagnostic Messages

q_xError

q_etResult

Description

FALSE

Ok

The event was set.

TRUE

TargetIdInvalid

The event was not set.
Cause: The input value of i_udiTargetId is invalid.
Solution: Provide a valid target ID. The value must be greater than 0. Configure the target ID with the variable udiUnivocalId.

TRUE

ColorIdInvalid

The event was not set.
Cause: The input value of i_etColorId is invalid.
Solution: Provide a valid value. Select a value defined in ET_EmulationColors.

FALSE

BufferFull

The event was set.
Cause: The internal events buffer is full and starts to overwrite prior events.
Solution: Enlarge the internal events buffer by using the global parameter Gc_udiInternalEventsBufferSize and/or enlarge the event OPC UA structure by using the global parameter Gc_udiMaxNumberOfEventData.