News:

SMF - Just Installed!

Main Menu

Random number using Range function

Started by jvblade, July 25, 2025, 05:39:34 AM

Previous topic - Next topic

jvblade

I am trying to generate a random number between two values using the MS Object Range, but I keep getting an error. Here is what I have:

float random = 0;

random = Range(0.75f,1.25f)

Any hints that you can give?

EasyPLC_Master

This is the syntax:

float rnd = MS.Range(0.75f, 1.25f);