FB_RandomGenerator - Init (Method)
Type: |
Method |
Available as of: |
V1.0.0.0 |
Versions: |
Current version |
Initialization of the random generator FB_RandomGenerator
As the generation of the random numbers is effected in accordance with the linear congruence method, a start value i_diNstart is required which is set by means of the Init method. This can be any integer > 0 which is located within the value range of data type DINT.
This method must have been called up once before calling up the GetDint or GetLreal methods.
Input |
Data type |
Description |
---|---|---|
i_diNStart |
DINT |
Start value of the random number row |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
92 |
NStart is outside the valid range. |
Enumeration name: |
NStartRange |
Enumeration value: |
92 |
Description: |
NStart is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_diNStart, an invalid value has been transferred. |
At the input i_diNStart, a value greater than 0 must be transferred. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The initialization has been completed successfully.