LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop in fpga is not executed

Hi,

 

I have two problems when changing my FPGA vi to Labview 2011.

 

I am using the following code:

NI_Forum_FPGA_Supervision_Sinus.png

 

I copied the second (supervision) loop from an old FPGA project from Labview 2009 where it was working fine. In my RT system the variable "HeartBeat" is changed every 5ms as long as the RT system is running. But if I activate now this loop in Labview 2011 the loop is never executed and all other loops also stop after some milliseconds. I tried for hours now to find some mistakes, but all attempts were in vain. Just if I deactivate the whole heartbeat system, all other loops run fine.

 

The second problem is that after an upgrade from LabVIEW 2010 SP1 to 2011 the sinus signal generation in the first loop stopped working. The output of "theta" I get is always 0.5+StepSize. In my old system, the loop was counting fine and the "add" vi was wrapping around to -1 when 1 was reached. Now my output of theta is constantly 0.5+Stepsize (and it changes when I change Stepsize during the execution of this vi).

 

I am really thankful for every tip or hint since I do not know what was changing in the LabVIEW versions.

 

Thank you and best regards

 

Andy

 

 

 

0 Kudos
Message 1 of 27
(4,074 Views)

Hi Andy,

I do not see the problem from this diagram. Maybe I'm missing out something that the zealots could help you with, but meanwhile, I would ask you to attach your VIs so that we could reproduce the problem if possible. Please save your VIs in the respective versions before attaching.

 

Thanks

Prashanth N
National Instruments
0 Kudos
Message 2 of 27
(4,068 Views)

Hi Prashanth ,

 

I have just the newest version we have (2011) available here. In this version, the two described errors are happening. So I attached the used vi saved in this version.

 

Thank you in advance for your help.

 

Best regards

 

Andy

 

 

0 Kudos
Message 3 of 27
(4,056 Views)

Andy,

 

To reproduce the problem, I need the file you used initially, and then the final file.

You could try to reproduce the problem youself to debug it.

Try saving the attached VI in a previous vesion (Use File -> Save for previous version) and then open it in older and newer versions of LV. If it works in an older version but not in a newer version, it definitely is a bug.

 

Regards,

Prashanth N
National Instruments
0 Kudos
Message 4 of 27
(4,043 Views)

Hi Prashanth ,

 

I managed to reinstall LabVIEW 2010, saved the FPGA vi in version 10, compiled it again, downgraded the cRIO to the rt System software 3.6 and run the FPGA code again. The sine wave is working again. So the code of the upper loop works fine in 2010 but when changing to 2011 it does not work for the first case, where the sinus is produced. I attached both vi's, so that you can try to run them also on your system with different versions of LabVIEW.

 

Regarding the problem of the lower loop, it still does not execute. I used it from an old vi from LabVIEW 2009, but I do not have this version available here and I also do not want to install all old LabVIEW versions on my computer just for testing a simple loop. Thus maybe one can give me a hint why this loop is not running or stopping immediately after the fpga starts running. Or maybe there is a easier and more efficient solution to check that the RT system is still active and running? This is my code again:

NI_Forum_SuperVisionLoop.png

 

 

Thanks a lot for everybody's help.

 

Andy

 

0 Kudos
Message 5 of 27
(4,038 Views)

Hi,

 

I investigated the problem now further and found out that the "add" vi is not working correctly in the case structure in LabVIEW 2011. It works fine in LabVIEW 2010. So I created a new vi for the FPGA and then copied the case structure, removed the case structure so that just the vi's in the case structure are left and then I pasted again the case structure. As you can see in the figure, the code in the case structure and from the removed case structure is the same. But there is a red dot at the "add" vi in the case structure. And when you run the attached vi you will see that just theta and TestSignal are running and working. theta2 and TestSignal2 stay constant.

 

NI_Forum_AddError2011.png

 

I have no idea why it is like this but I think this is a bug in the 2011 version. Thus I would really appreciate if somebody could acknowledge this and/or give me a hint how to avoid this strange behavior and what I am perhaps doing wrong.

 

Thank you in advance for your help.

 

Best regards

 

Andy

 

 

0 Kudos
Message 6 of 27
(4,019 Views)

Hi Andy,


I am currently on vacation, and unable to use some of my office resources. I will look into this as soon as I get back to my desk. I appreciate your patience.

 

Regards,

Prashanth N
National Instruments
Message 7 of 27
(4,011 Views)

Pachi, kudos for giving him an update while you are on vacation Smiley Very Happy

=====================
LabVIEW 2012


0 Kudos
Message 8 of 27
(4,006 Views)

Gld to help out 🙂

Prashanth N
National Instruments
0 Kudos
Message 9 of 27
(3,988 Views)

Hej,

 

I am wondering if nobody else gets this strange behavior for the add vi inside a case structure. Since Prashanth is on vacation, I was hoping there is somebody else who could give me a hint or work around to this problem? Is there another place where I can report bugs? I cannot imagine a cause why the add vi is behaving different in a case structure, especially when one takes into account that it works in 2010 and not in 2011.

 

Thank you in advance.

 

/Andy

 

 

0 Kudos
Message 10 of 27
(3,962 Views)