LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[FPGA] Loop rate very slow: Do FPGA I/O nodes in parallel loops block each other?

Hi,

 

I am using cRIO-9075. Mod1 is NI 9263, Mod2 is NI 9227, Mod3 is 9215.

 

Please see my VI attached or the given screenshot.

The FPGA code is based on the "NI CompactRIO Waveform Reference Library" (it's the lower loop).

 

The upper loop was added by me and is writing a waveform from blockmemory to the NI 9263 module (Mod 1).

 

The data sampled in the lower loop is running at 1 kHz. The control "AO Update Period" for the upper loop has a value of (for example) 10 (=uS).

The problem is, that this loop is running much much slower than it should. Once I disable the FPGA I/O node in the lower loop (as done in the attachments), it's running as fast as it should.

 

It seems to me, that the FPGA I/O nodes are blocking each other. I tried to figure it out by reading through serveral NI documents, but until now I have no idea how to solve that.

 

Can you give me some advices? Some general tipps about the VI?

 

Thanks!

 

Download All
0 Kudos
Message 1 of 6
(3,761 Views)

Ok, it seems that I did not investigate it enough. The reason I supposed in my previous post above does not seem to cause the problem.

 

When I directly start the FPGA VI and having previously set the "AO Update Period" to 10, it's working.

When starting the FPGA VI through the RT Host VI, it's not working.

 

Can I use "Read/Write Control" to set initial values before invoking the "Run" method?

 

Thanks!

0 Kudos
Message 2 of 6
(3,741 Views)

How about something real simple like giving the control a default value of 10.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 6
(3,736 Views)

You could also move the control to inside of your loop so that you can actually update it on the fly.  But definately make sure your default value is set.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(3,726 Views)

Hi, thanks so far.

Originally the control was inside the loop. Then I tried if it makes a difference if it's outside.

Ok, i really seems to be that default value of "100000" for "AO Update Period".

 

Starting the VI directly woks like expected. Having "AO Update period" inside the loop makes it possible to control it as it's running.

 

But, please see the attachment. When starting the FPGA through RT and setting the appropiate value, it does not seem to work. The oscilloscope show's the same behavior like "AO Update Period" was 100000.

But when reading the value of "AO Update Period" afterwards (while the FPGA is running), it shows the expected value of "10".

 

Having changed the default value to 10 works so far, but I am not able to changed it (see attachment).

 

So the problem is: Why is "Read/Write control" not working here? Why is still the default value used?

 

 

0 Kudos
Message 5 of 6
(3,720 Views)

Omg, I found it.

 

I am sorry! I was struggeling with this almost the past day, and also most of the time of today. When starting this post, I really was out of ideas.

 

The reason is very simple: I am starting the FPGA, loading the waveform ect,. and then starting the DAQ using the "Waveform reference library".

But using the default workflow of the examples (hidden in a SubVI) I missed there the "Reset" method is invoked .... awww.

 

Again, sorry! But you pointed me into the right direction - thank you!

0 Kudos
Message 6 of 6
(3,708 Views)