LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer data from RT to FPGA

Hello,

I need to send a clock speed (declared in the RT VI) to the FPGA, but only once, so I'm trying not to use a DMA FIFO that would be read more than once.

I already tried to use global and shared variables but it didn't worked.

 

Does anyone know how I could do that ?

0 Kudos
Message 1 of 7
(590 Views)

Hi Bivrox,

 


@Bivrox wrote:

I need to send a clock speed (declared in the RT VI) to the FPGA, but only once, so I'm trying not to use a DMA FIFO that would be read more than once.

I already tried to use global and shared variables but it didn't worked.


There are several options to exchange data between FPGA  and RT host, and they are all explained in example VIs/projects coming with LabVIEW.

Globals or SharedVariables don't belong to that list of options!

 

Have you tried to use a simple control in your FPGA VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(584 Views)

I can't use simple control because of the hierarchy i'm having in the project (the FPGA vi isn't directly called in the RT there are lot of VI called before it).

Where could I find the examples given by Labview ?

 

Thanks for your help !

0 Kudos
Message 3 of 7
(578 Views)

Hi Bivrox,

 


@Bivrox wrote:

I can't use simple control because of the hierarchy i'm having in the project (the FPGA vi isn't directly called in the RT there are lot of VI called before it).


I don't understand your problem…

 


@Bivrox wrote:

Where could I find the examples given by Labview ?


Either example finder or in the "File->New…" dialog…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(571 Views)

Bivrox_0-1721051763839.png

I need to send the "FPGA Frequency" (in my RT VI) to my FPGA VI, this data will never change once the program is running, it's just to adjust the FPGA frequency by hand.

Here is my FPGA VI using it:

Bivrox_1-1721051912480.png

(I can't publish my entire project but you can see the FPGA Frequency being collected then used to time the FPGA loop)

0 Kudos
Message 5 of 7
(563 Views)

Hi Bivrox,

 


@Bivrox wrote:

I need to send the "FPGA Frequency" (in my RT VI) to my FPGA VI, this data will never change once the program is running, it's just to adjust the FPGA frequency by hand.

Here is my FPGA VI using it:

Bivrox_1-1721051912480.png


  • Usually you start the FPGA VI when opening the FPGA VI reference (or even upon startup of your RT target (cRIO?): when you write to this control in your RT host "much" later after the start of the FPGA VI then the FPGA will never use your new frequency value because it uses the value from this control read upon start before the loop. That's called a race condition…
  • How do you transfer the value into this global variable of your FPGA target? Why don't you use a control even though you use an indicator in the FPGA???

I still don't understand your problem and I also understand your code constructs. (Maybe because you only show very small part of the code.)

Best regards,
GerdW


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

Understanding Communication Options Between the Windows HMI, RT Processor, and FPGA

For your use case, you can look at the options for Tag

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 7 of 7
(463 Views)