Learn How to Program a Do More PLC Random Number in Minutes!

482 views May 11, 2023

The current UTC Coordinated Universal Time value ($UTC (DST21)) is used with the Random Number Seed (RANDSEED) instruction to set a seed value. This is triggered on the leading edge of X0. Using the math function Random Integer (RANDINT), this generates a random number between 0 and 2,147,483,647. We are storing this at address D0. The MOVER instruction is then used to move the first 12 bits of D0 to the first 12 bits of WY0. As X0 transitions from off to on, a new random number can be seen. Programming and examples of the BRX Do-More series can be found at this URL: https://accautomation.ca/series/brx-do-more-plc/ There are several reasons why we are using the BRX Do-More Controller. Here are just a few. – Standalone PLC with built-in I/O – Built-in Data Logging – Communication ability – Ethernet Port, RS232, RS485, USB – support for protocols such as Modbus RTU, Modbus TCP, ASCII, K-sequence (DirectLOGIC users), Custom Protocols (ASCII over serial, TCP or UDP over Ethernet) – Built-in Analog input and output – Integrated motion control – High-speed counters – Powerful instruction set (Video of Instructions in software) – Ability to expand the system with a variety of modules – Part of the Do-More series of PLCs uses the same free software. (Do-More Designer) – Integrated simulator in the software capable of external communications for testing