FB_RandomTargetsGenerator - GetRandomSeed (Method)

Overview

Type:

Method

Available as of:

V1.1.0.0

This chapter provides information on:

oTask

oDescription

oInterface

oReturn Value

oDiagnostic Messages

Task

Retrieve the present random seed value used for the generation of random targets.

Description

The method GetRandomSeed allows you to retrieve the present random seed value used by the function block for the generation of random targets.

If the method returns the value zero, the seed was not initialized and that no other methods of the function block were called yet. Otherwise, at the first call of a method for the generation of random targets, if the seed has a zero value, it is automatically initialized to a non-zero value, based on the CPU timer.

Interface

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

Event-triggered message that gives more detailed information on the diagnostic state.

Return Value

Data type

Description

UINT

The value of the seed currently used by the function block for the random generation.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value of q_etDiagExt

Description

Ok

Ok

0

Ok

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The current value of the random seed was returned. A value of zero means that the random seed was not initialized yet.