11-26-2012 05:30 AM - edited 11-26-2012 05:31 AM
Hallo,
here is a simplified version of my code, the matlab script is used so it might not work in your computer. keep in mind that what im doing for the variable rbd is done also for another 5 variables so cables here and there are no good option to me...but i hope you can help and suggest sth better
11-26-2012 02:13 PM
Maybe you oversimplified your code, but it is crawling with race conditions. Most likely the local variables on the right are read way before the code on the left has a change to calculate the results. I also noticed that your code does not have a toplevel while loop. Are you using "continuous run" by any chance?
@valdi wrote:
... keep in mind that what im doing for the variable rbd is done also for another 5 variables so cables here and there are no good option to me...but i hope you can help and suggest sth better
What is wrong with cableswires? I don't understand your aversion. Why are you using value properties instead of local variables in some places? What is the purpose of the slow FOR loop in the upper right?
Instead of 5x duplicate code, use one instance of the code and a FOR loop to iterate over all parts. Try it!