07-16-2007 03:14 PM
07-16-2007 03:19 PM - edited 07-16-2007 03:19 PM
cant you just have an indicator on the index of the loop?
you probably ask for something else. could you post your vi?
Message Edited by Gabi1 on 07-16-2007 10:20 PM
07-16-2007 03:19 PM
07-16-2007 03:20 PM
07-16-2007 03:22 PM
07-16-2007 03:57 PM
you might need to go trough labview introduction...
if you want to search for the first 15 nbs, then make a FOR loop of 15 iterations, in which you would have a while loop, looking if the nb is non divisible. to find the iteration of the loop, you have on the bottom left side of the the loop a small 'i' icon. wire it to an indicator (left mouse button - create indicator) to see the iteration. if you want to make operations on it, then wire it to your operator in the while loop.
out of your FOR loop will be created an array of nbs, (i strongly recommand avoid 15 stacked indicators...).
The while loop itself should have two conditional exits: 1) the nb has been found divisible. 2) the nb of iterations is equal the nb to be checked.
this should get you started. begin to write a vi, and post what you get. we will help you trough correction. (any more than that and i would do your job 🙂 )
07-16-2007 04:28 PM - edited 07-16-2007 04:28 PM
here a starting point based on what you had in mind. it is definitely not optimised, so one might think of more efficient ways of doing it.
remark with this method one can only search from nb 2.
also, there is quite a bit of unnecessary operations there, as well as duplication of info with the shift register. when i get some time i'll make some better engine.
Message Edited by Gabi1 on 07-16-2007 11:31 PM