Random number generator in Vijeo Citect SCADA

Mishtavince

Member
Join Date
Jan 2014
Location
Gulf
Posts
19
Hello,

Could somebody please help me out with coding a 'Random number generator' in vijeo citect.

For example if i create an analog Local variable, i would want that variable number to change every 2to3 secs with numbers between 0 to 240.

I tried using the Rand() function, all i got it to do is change from 0 to 1. I am a bit weak and new to citect as I've been working with it for barely a month.

I would really appreciate any input or an example code on this.

Thank You.:)
 
Thank you Nhatsen,
Is there a way to update it every few seconds?

variable = Rand(241);
the above only give a '0' in run mode
 

Similar Topics

Hey folks, I was just wondering what thoughts were about a completely 100% random number generator. I looked on The Google but didn't really open...
Replies
54
Views
16,532
Hi,Does anybody know if there are any routines in unity pro that produce random numbers like the routine rand() in C ?
Replies
1
Views
4,033
Ive got a client that needs random numbers generated for a security system. Just want to know if any 1 has some ladder or ST software or scripts...
Replies
11
Views
8,875
Can anyone help me create a few ladder logic lines to randomly generate intergers btw 0-100. I have tryed loading the scan timer value, then ANDD...
Replies
16
Views
13,333
Hi guys, I need your valuable suggestions about writing a module (AWL Step7) generating random integer numbers... Let's say the users define the...
Replies
19
Views
20,480
Back
Top Bottom