02-24-2020 11:00 PM
i have to generate a LabVIEW function which will generate number from 0 to 100 without the use of any loop (FOR or While). Because a loop will pass the Value after final iteration.
02-24-2020 11:14 PM
Where are these requirements coming from? Is this homework?
What you describe almost always requires a loop. And saying "Because a loop will pass the Value after final iteration" is meaningless because that isn't a problem with the loop but how you are programming it.
Describe what the final result should look like. You say generate a number from 0 to 100, but do you mean an array of numbers from 0 to 100? Or do you mean randomly give a number that is somewhere between 0 and 100?
I would recommend you learn more about LabVIEW from here. How to Learn LV
02-24-2020 11:30 PM
Option 1: right click on the tunnel coming out of the loop and change the Tunnel Mode to "indexing".
Option 2: use Ramp Pattern
02-25-2020 12:09 AM
Sir, i changed the tunnel mode to index mode. but my problem is not solved. Actually, i want to run a Case structure which requires numbers to run the cases from o to 10 in a sequence. I have two options 1. Manual, Option 2. For Loop. if I am using FOR Loop, i have to put whole of my code inside. Which stops my whole process. I am working on a pattern matching application where i am getting data from a camera. If i put whole of the code inside the FOR loop, it is not working then. Thats why i need a number generator program to solve this problem. Otherwise i have to run the Case structure manually. My main aim is to make it Automatic. Sir ask me if you need any other information.
02-25-2020 12:11 AM
Sir, i changed the tunnel mode to index mode. but my problem is not solved. Actually, i want to run a Case structure which requires numbers to run the cases from o to 10 in a sequence. I have two options 1. Manual, Option 2. For Loop. if I am using FOR Loop, i have to put whole of my code inside. Which stops my whole process. I am working on a pattern matching application where i am getting data from a camera. If i put whole of the code inside the FOR loop, it is not working then. Thats why i need a number generator program to solve this problem. Otherwise i have to run the Case structure manually. My main aim is to make it Automatic. Sir ask me if you need any other information.
02-25-2020 12:51 AM - edited 02-25-2020 12:52 AM
Hi Sachin,
@Sachin77 wrote:
Actually, i want to run a Case structure which requires numbers to run the cases from o to 10 in a sequence.
Put the case structure inside a FOR loop, set to run 11 times.
Wire the "i" terminal of the loop to the case selector input…
As this is pretty basic LabVIEW stuff you should take note of those "Training resources" offered here!
Remark: you don't want to run the "cases in a sequence" as a "sequence" is something bad (mostly…) in LabVIEW!
02-25-2020 01:14 AM
@Sachin77 wrote:
Sir, i changed the tunnel mode to index mode. but my problem is not solved. Actually, i want to run a Case structure which requires numbers to run the cases from o to 10 in a sequence. I have two options 1. Manual, Option 2. For Loop. if I am using FOR Loop, i have to put whole of my code inside. Which stops my whole process. I am working on a pattern matching application where i am getting data from a camera. If i put whole of the code inside the FOR loop, it is not working then. Thats why i need a number generator program to solve this problem. Otherwise i have to run the Case structure manually. My main aim is to make it Automatic. Sir ask me if you need any other information.
It's not exactly obvious what you're doing, or why it doesn't work - can you attach your VI?
That might make it easier for us to understand your problem.
Beyond that, the learning materials that have been already suggested are likely to be a worthwhile investment - you can watch them as videos or read here.