FB_RandomGenerator - GetDint (Method)
Type: |
Method |
Available as of: |
V1.0.0.0 |
Versions: |
Current version |
Creation of a random number
Generates a random number of the DINT type according to the linear congruential method. See FB_RandomGenerator
Input |
Data type |
Description |
---|---|---|
i_diXmin |
DINT |
Lowest possible value of the random number |
i_diXmax |
DINT |
Highest possible value of the random number |
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 |
Data type |
Description |
---|---|
DINT |
Generated random number |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
ExecutionAborted |
93 |
The Init method has not been called up. |
Enumeration name: |
InitMethodNotCalled |
Enumeration value: |
93 |
Description: |
The Init method has not been called up. |
Issue |
Cause |
Solution |
---|---|---|
- |
The Init method has not been called up yet. |
Before calling up the GetDint method for the first time, the Init method must be called up. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The random value has been calculated successfully.