08-04-2006 10:52 AM
08-04-2006 11:50 AM
Vijay
Congratulations for making a working program. 🙂
We have seen your other post, but a code review is difficult because there are many things that are overly complicated and convoluted and should be done quite differently. For example you do entire loops to duplicate fuctions that are already part of labVIEW. I probably won't have time during the next few day to look at it in detail.
In the meantime, learn about shift registers. Also you use way to many unneeded local variables. You don't need a single one! Try to get rid of the sequence structure and wire everything together instead of teleporting data between nodes using locals.
Then of course are the purely mathematical aspects of your approach. You do way (way!) too many trial divisions, many more than actually needed. First in each prime check, the again in the main code. Over and over again. All trial divisions with numbers larger that half the input are also not necessary.
To make the code really fast, try to e.g. implement the Sieve_of_Eratosthenes. It will be orders of magnitude faster than what you are doing.
08-04-2006 01:34 PM
08-04-2006 02:46 PM
08-05-2006 12:40 AM
hello jason,
thanks for your comments,
actually i dint think of it that much ill c to it now
with regards
vijay
04-28-2009 02:17 PM - edited 04-28-2009 02:18 PM
Hi
I upgraded from Labview 8 to Labview 8.6 but I am unable to run some of the vi's which used to run before. I get a message that it is unable to find "Digital Single Write.vi" and "Digital Group Config.vi". How do I get this going?
thanks
04-28-2009 02:36 PM
04-28-2009 02:48 PM
Hi GerdW,
Nothing intentional. I did it and then I went back to delete it to post as a new thread it wouldn't let me do it. Thanks for your reply
The DAQ routines are part of a vendor supplied package and they are 5 years old now. The system was running fine until I upgraded to new Labview8.6. I am trying to install Traditional NI-DAQ (Legacy) Version for Windows 2000/XP to see whether it would help.
thanks