Example - Ladder Diagram
SRND
The SRND instruction changes the seed value for random number generation to the WORD value of the data register S.
Ladder Diagram Example
![]()
When the contact, M0.2, is ON (1), the instruction uses the value, 732, as the seed for randomly generating the number, 3,191.
![]()
SRNDP
The SRNDP one-shot instruction changes the seed value for random number generation to the WORD value of the data register S.
Every time this instruction executes, it energizes the output only once.
Ladder Diagram Example
![]()
When the contact, M0.3, is ON (1), the instruction uses the value, 555, as the seed for randomly generating the number, 3,191.
![]()