Instruction Parameters
Supported PLC Series
| PLC-AES | PLC-FB | PLC-ES |
|---|---|---|
| ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| D | ✓ | – | ✓ | ✓ | ✓ | – | ✓ | ✓ | – | ✓ | – | ✓ | ✓ | ✓ | – |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | – |
| Carry | F11.2 | – |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| D | The only operand. Entries are only WORD data registers. This is where the random number is stored. The value range of the generated number is 0 ~ 32,767 (215-1). |
Notice
Error Flag (F11.0) Notice
The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.
Instruction Behavior
The RND and RNDP instructions behave as follows:
- The number randomly generated will be in the range of 0 ~ 32,767 (215-1).
- The generation of a random number is based on an internal calculation formula.
Ladder Diagram Examples
RND

The RND instruction randomly generates a WORD value number and saves the number in an assigned WORD register, D.

When the contact, M0.0, is ON (1), the instruction randomly generates the number, 7,103.
Memory Monitor

RNDP

The RNDP one-shot instruction randomly generates a WORD value number and saves the number in an assigned WORD register, D. Every time this instruction executes, it energizes the output only once.

When the contact, M0.1, is ON (1), the instruction randomly generates the number, 27,850.
Memory Monitor

