07-24-2005 12:20 PM
07-24-2005 01:32 PM
Yes, LabVIEW is easy! It just takes a little bit of practice and you can program everything you want very quickly. Often beginners don't see the solution because they don't think it could possibly be this simple. 🙂
I choose the Quotient&Remainder over the plain division because I don't like to mix blue and orange wires. The division always results in a floating point number, but the case structure can only deal with integers (If you wire a DBL to a case selector terminal, you get a little grey dot warning you that a coercion takes place). This can cause problems with rounding errors.
The inputs are true unsigned integers, they can never be negative and must always be whole numbers. (You cannot have 2.5 hits ;).) While you can do everything here with DBL, you must then ensure by some other means that the input values are positive whole numbers.
Quotient&Remainder with interger inputs always produces exact integer outputs. It probably does not matter here, but you could even implement some sort of rounding (e.g. if the remainder is larger than "at-bats/2", add 1 to the IQ).
The nice thing is that there is an infinite number of possible solution. If you would ask the top ten LabVIEW programmers to solve your problem, you would get ten different solutions, but they will all give the same result. One might be slightly faster, one might use less memory, another might have a diagram that is easier to read, one looks prettier, and one might have a diagram that can be modified more easily if needs change. Programming style is highly personal!
Learning LabVIEW is like learnig to read and write. Once you learned to read and write, you can use it equally well to write poetry, a grocery list, a novel, a personal check, or a ransom note. Once you know LabVIEW, the possibilities are endless. 🙂
07-24-2005 02:39 PM
07-24-2005 03:15 PM
07-24-2005 03:24 PM
07-25-2005 01:08 PM
07-25-2005 02:19 PM
07-26-2005 02:58 AM
tbob,
I tried to load that file, but your version is too new. Can you save the file to an older version?
07-26-2005 10:37 AM