10-22-2009 03:57 AM
Hello,
I have a MCB2400 and LV2009 and the normal Code-Generation works fine. But if I try the Run-Time Option: "Optimize for Speed" I always get this Error:
"LV runtime error in file ...\CCGArrSupport2.c at line 2621: 6 3"
I already tried a workaround, which helped somebody for blackfin: http://forums.ni.com/ni/board/message?board.id=420&thread.id=811
But it didn´t help in my case.
bye
amin
Solved! Go to Solution.
10-23-2009 01:53 AM
10-23-2009 04:44 AM - edited 10-23-2009 04:50 AM
Hi,
thank you for your response.
I tried now some examples, which I can post here. And I found out that it is enough to use just the standard deviation node like here:
In this case it doesn´t bring the "LV runtime error in file CCGArrSupport2.c ", but the VI doesn´t work anymore (the outputs is 0) when I just activate "Disable parallel execution" (not the whole optimize settings, because there is no debug output anymore), which is necessary for the optimize options.
If I use the "Disable parallel execution" alone for the whole project, I get the same "LV runtime error in file CCGArrSupport2.c " Error. So the Problem seems to be in this Option.
Same Problem if I try to profile the standard deviation. I don´t get a error, but it doesn´t work.
bye
amin
10-23-2009 06:58 AM
It appears the example provided is not so useful in reproducing your issue. Here I have to admit, I don't have a MCB2400 board (I tested on Stellaris hardware, and simulated both devices). So, only RT Agent might to be "guilty" here.
As shown in the picture, we can still watch some results on host, even if debugging is not enabled (e.g. Output window) .
I am more aware about that runtime error, and I am still waiting an example since I am not able to build my own (it seems that function from CCGArrSupport2.c is never called).
10-23-2009 09:01 AM - edited 10-23-2009 09:02 AM
Hi,
you are right. In the example it was just a Problem with the output.
Now here is one little part of the project which brings the runtime error allone, which brings the runtime error (just if the optimize option ist activated).
The Black Node is a Sub-Vi.
bye & thanks
amin
10-23-2009 04:18 PM
The runtime error has its roots in the constant initialization.
When choosing "Optimize for Speed" or just "Generate C function" calls for applications with subVIs that contain constant array initialization use always the option "Allocate Constants" on "First Use".
Other workarounds may apply as well: initialize everything in Top VI, use Initialize Array instead of constant arrays, etc.
10-26-2009 04:10 AM
Ok thanks !
The woraround with "Allocate Constants" on "First Use" works fine.
But I don´t understand why other functions work in a sub-vi with the same array ?
bye & thanks
amin