Thread Content
Recently, the factory requested a temperature setting to meet the company’s inspection requirements: the temperature was supposed to display a preset value, yet it was also necessary for it to change. So the idea came to generate a random number with a very small range of variation. But there is a problem when calling the random number generation function. For example, if the upper limit is set to 50 and the lower limit to 48, the random numbers generated start at 46 and increase gradually, reaching around 49 before suddenly dropping back to 46, and this cycle repeats. Could it be that the settings are incorrect? Is it not possible to call the random number function separately? I earnestly seek advice from those who know more!
It seems no special settings are required either; the document states that only the OT/OB limits are needed
Yes, but in practice the values obtained are not within the set upper and lower limits; generally, the initial values are below the lower limit! I’m really confused
I want to know the answer too; I’m currently learning about Allen-Bradley systems
From a programming perspective, it is necessary to use time as the random number seed so that the generated random numbers lack any pattern; as for the random functions in Allen-Bradley systems, I’ve never used them at all
This is really useful; let’s see how everyone solves it