05-04-2010 11:54 PM
05-05-2010 12:54 AM
Hi ravi bagade,
i'm not sure if i completly understand what you mean, but if you only need 1 OR 0 randomly, then you can use the attached example.
Mike
05-05-2010 01:47 AM
05-05-2010 02:01 AM
Sorry,
but i don't understand it.
If you have a number which type ever, then you can create the digital representation out of it. In your case i think you need 0 to 1023. You can create these numbers randomly with the random block, shown on the image from previous post and multiply the result by 1023. Round it to U16 and create your digtial data from it. After this you can plot it on a digital graph.
Try to help.
Mike
05-05-2010 08:20 AM
Hi Ravi,
This will create a random digital waveform. Just need to set the Bits, 10 in this case, and sample rate.
Rgs,
Lucither
05-10-2010 04:18 AM
05-10-2010 05:22 AM - edited 05-10-2010 05:26 AM
If you want a boolean out instead of a numeric,
Take Mike's first reply (Random -> Absolute Value) and Add an "=0" comparisson on the end, this will give you an array of T/F.
Edit:
Alternatively If you want it as a different representation, use the adapt to type functions to chane the type.
You can always ensure it is whatever numeric range you want if you use the boolean method wired to a T/F comparrison and wire the constant values you want to the inputs.
James
05-10-2010 05:35 AM
Arghh
Timed out when I was editting again to add a pic
James
05-10-2010 06:24 AM - edited 05-10-2010 06:27 AM
Your question has been phrased in a way to cause confusion to what you actually want to achieve. Are you trying to display the random generator like a bit stream on a graph ie:
If so then this vi will do that:
Every time you press the 'Generate' Button it will create a digital array according to the 10 bit random number generated and display on a graph.
There is a way of doing this using a 'Digital waveform graph', i personally have never used it and after about 5 minutes of just looking into it for you gave up It is something i should spend the time to look into as it presents your digital data nicely, showing the 0's and 1's within the graph.
If i have misunderstood what you want again i apologise
Rgs,
Lucither
05-10-2010 06:31 AM
ravi bagade wrote:
hi , i want to generate the digital random generator for my project,which counts the 0 and 1 randomly.