Here are a few more coding tips:
- As already mentioned, your sequence has no meaning. Delete it.
- You can use autoindexing on the 2D array.
- You can resize index array and get all desired values at once. When you don't wire an index, it will be one higher than the index above it. The >0 can be done on the entire array once instead of 9 times.
- You can do the running sum in the same FOR loop. There is no need to sum increasing subsets over an over again, just add the new value to the previous sum with each iteration.
- To multiply, (or not) with -1, you don't need two pairs of identical diagram constants, two selects, and two multiplies. Just use a "negate" in a case structure.
Here's an image how your entire code (except for the DAQ) could look like.:D
(there could be bugs, because I cannot test. Many more simplifications are probably possible).

Message Edited by altenbach on
04-07-2008 07:42 AM