LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Optimize for Speed => LV runtime error in file CCGArrSupport2.c (LV2009 / MCB2400)

Solved!
Go to solution

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 

0 Kudos
Message 1 of 7
(8,676 Views)
Could you attach a (simplified) project with this behavior?
This might allow a faster investigation.
Probably fixing this will also solve the other thread, at least partially.
0 Kudos
Message 2 of 7
(8,661 Views)

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:

std.png

 

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

Message Edited by aminat on 10-23-2009 04:50 AM
0 Kudos
Message 3 of 7
(8,650 Views)

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) .


optimize for speed results.PNG

 

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).

Message 4 of 7
(8,643 Views)

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).

 

nw.JPG

 

w.JPG

 

The Black Node is a Sub-Vi.

 

 

bye & thanks

 

amin

Message Edited by aminat on 10-23-2009 09:02 AM
0 Kudos
Message 5 of 7
(8,638 Views)
Solution
Accepted by topic author aminat

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.

Message 6 of 7
(8,622 Views)

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

0 Kudos
Message 7 of 7
(8,610 Views)