LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

properly start FPGA lvbitx

Solved!
Go to solution

hello

if I embed the lvbitx bitfile into the startup.rtexe, does that mean I better delete it from the cRio?

Or just disable "run the vi"? There will not be a vi, when its compiled? As in no connection to Labview?

http://www.ni.com/white-paper/9640/en/

 

Reason I am asking, on cRio boot first FPGA starts, then startup.rtexe. Then my Startup.rtexe seems to start FPGA again, which somehow causes the FPGA to fail. Propably because it throws an error a la "FPGA already running". When I then run my real time host vi, FPGA starts for good and everything works fine.

So if there is no FPGA on cRIO boot, startup.rtexe is run first. This then starts controlled the embedded FPGA just once and it should work?

or stop it and start again with the lvbitx file embedded?

http://zone.ni.com/reference/en-XX/help/372928D-01/capi/functions_session/

 

0 Kudos
Message 1 of 17
(6,432 Views)

FPGA can be set to run from its Build Specification, the Open FPGA VI Reference Function (checkbox), or Run (Invoke Method) from the FPGA interface.

 

As always check the cRIO Dev Guide (section 5 in this case): http://www.ni.com/compactriodevguide/

PS consider using the RAD http://www.ni.com/example/30986/en/


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
Message 2 of 17
(6,425 Views)

@Steffen01 wrote:

So if there is no FPGA on cRIO boot, startup.rtexe is run first. This then starts controlled the embedded FPGA just once and it should work?


Yes, that's correct. You should include the bitfile in your startup.rtexe (this happens automatically through Open FPGA VI Reference) and you should not load the bitfile separately into the dedicated flash memory on the cRIO.

 

You should load the bitfile to flash ONLY if you need the FPGA bitfile to start running immediately on boot, before the LabVIEW application starts (or if you don't have a real-time application at all, and you only need the FPGA to run).

Message 3 of 17
(6,422 Views)

soemthing like this:

start bitfile.gif

 

do I have t make sure the built numbers match? Bitfile is 1.1.16 and rtexe is 1.1.17. Can always compile rtexe as 1.1.16, thats faster for testing.

 

Its cRIO 9074 with 9870, 9871 in scan mode and profibus in FPGA. But it really just comes unstuck, when the FPGA does not start. So I try on Monday.

0 Kudos
Message 4 of 17
(6,409 Views)

Steffen01 wrote:

do I have t make sure the built numbers match? Bitfile is 1.1.16 and rtexe is 1.1.17. Can always compile rtexe as 1.1.16, thats faster for testing.


The build numbers are irrelevant. However, I recommend that each time after you build the FPGA bitfile, you re-select it in the Configure Open FPGA VI Reference dialog box to make sure that it picks up the latest version of the bitfile.

Message 5 of 17
(6,402 Views)

ok. I guess I could also do stop and start FPGA as per this one

 

http://zone.ni.com/reference/en-XX/help/372928D-01/capi/functions_session/

 

this would be great, if it finally works.... Will mark as solution, if it works onMonday.

 

@Terry, I guess the safest bet is, I ftp in. So I see whats there. Then delete lvbitx manually

0 Kudos
Message 6 of 17
(6,399 Views)

still no joy. Seems its not just the FPGA.

I made a vi that starts and stops the FPGA from PC host side, that works, FPGA LED on cRio is on/off.

When I start RT host main vi manually, Labview deploys everything and then the cRIO is working. But in the long run its meant to be a compiled version.

The cRio start all ok.rtf shows the cRIO booting,

Startup Application: /c/ni-rt/startup/startup.rtexe

 NI-VISA Server 14.0 started successfully.

Welcome to LabVIEW Real-Time 14.0.1

So the startup.rtexe should have started all the involved vis?

 

Download All
0 Kudos
Message 7 of 17
(6,339 Views)

if I make a distributed setup, why is it 17 MB at least in vis, but the startup.rtexe is only 3 MB including 1.3 MB for the lvbitx file. Does it really compile everything?

Could there be issues with identical names for vis? Or names like [RT] Main.vi? Could it be, startup.rtexe cannot find something? It it runs on cRIO boot, but when I deploy it from Labview, it actually works?

0 Kudos
Message 8 of 17
(6,332 Views)

Hi Steffen,

 

Does it really compile everything?

Yes, LabVIEW is executing compiled code - always!

 

Could there be issues with identical names for vis?

Not that I heard of…

Or names like [RT] Main.vi?

Not that I heard of…

Could it be, startup.rtexe cannot find something?

Then it would not run at all -  or should give proper error messages you can handle in your code!

 

when I deploy it from Labview, it actually works?

That's the point why you should deploy your RTEXE from the IDE!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 17
(6,328 Views)

but then the cRIO can never run without Labview, because rtexe does not execute on bootup? cRIO should be able to run on its own.

I guess I put some markers into that Main vi tomorrow, see how far it executes.

0 Kudos
Message 10 of 17
(6,323 Views)