‎10-09-2015 03:12 AM - edited ‎10-09-2015 03:25 AM
Hi altenbach
Please refer to this fixed code to answer my questions if possible
I fixed the indexing problem, I still don't understand how to improve the array stuff (autoindexing and 2d to 1d array)
Thank you!
‎10-09-2015 11:00 PM
@patomated wrote:
Please refer to this fixed code to answer my questions if possible
You did not attach any code, just a picture. Please attach the actual VI.
‎10-10-2015 02:34 AM
Apologies.
Here it is.
‎10-10-2015 06:55 AM - edited ‎10-10-2015 07:00 AM
OK, you are doing way too many redundant things.
Attached is a very simple rewrite, keeping the results the same. Most likely you could simplify it quite a bit more. For example it would make sense to turn the area calculation into a subVI. Make it reentrant and have it keep the previous point internally. You should also add diagram comments to explain what the code segments do.

‎10-10-2015 08:26 AM - edited ‎10-10-2015 08:29 AM
I cannot thank you enough for all the help!
I hadn't realized how I could replace many of the things with simpler code, using shift registers and simple primitives instead of the formula node.
Thanks for all the other points. All are noted! Makes it much neatier and easy to use or modify later.
I hope I will be better in LabView later on so I could help people on the forum too!
‎10-12-2015 02:35 AM - edited ‎10-12-2015 02:39 AM
Hi altenbach
I've been using the help you've given me to modify the program myself but I've noticed that in your case the initial point of the curve is always 0,0.
What I want to do is start at any point that I specify and continue with it.
I cant see how to fix this using the complex array since im not familiar with it.
Could you offer me how to proceed with solving this?
I attached the vi of the program I want using your optimized soluions
‎10-12-2015 06:49 AM - edited ‎10-12-2015 06:50 AM
To keep it simple, just use a couple of local variables to initialize your first point when the VI starts with whatever values you have in for X and Y.

‎10-12-2015 10:17 AM - edited ‎10-12-2015 10:27 AM
@patomated wrote:
I've been using the help you've given me to modify the program myself but I've noticed that in your case the initial point of the curve is always 0,0.
What I want to do is start at any point that I specify and continue with it.
I cant see how to fix this using the complex array since im not familiar with it.
Could you offer me how to proceed with solving this?
I attached the vi of the program I want using your optimized soluions
Remember that your integration actually includes 0,0 for the area calculation, and that's the only reason I initialized with 0,0. There are many ways around it and the correct solution depends on how you want it to behave. We cannot know that.
And please change the file name when attaching a modified VI! It is confusing if you attach a new VI that has the same file name as an existing VI disucssed earlier.
‎10-12-2015 10:33 AM