LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom FPGA personality & RT

Solved!
Go to solution

Hi!

 

I am learning how to use Real-Time and FPGA module with myRIO. I'm trying to connect myRIO with a magnetic sensor (TLE5011) via SPI. The sensor requires an external clock for the PLL. I used the FPGA module to create a constant 4MHz clock on one of myRIO's DIOs. The clock only works when the customized FPGA VI is running. The problem is that the RT VI returns an error while the FPGA VI is running (−61202). 

Is it possible to run a custom FPGA VI and use RT functions (such as SPI)? Is there any other way to create a proper 4MHz clock signal?

0 Kudos
Message 1 of 3
(2,313 Views)

How are you starting and running the FPGA vi? The error message associtated with that error code is "LabVIEW could not perform the operation because an FPGA VI reference to another VI is currently open. You must close the currently open FPGA VI reference before attempting to perform this operation." Are you trying to run multiple FPGA vis at the same time? Or trying to run the FPGA vi from your RT code while it is already running?

0 Kudos
Message 2 of 3
(2,282 Views)
Solution
Accepted by topic author sskr33

I've tried to run the FPGA VI and RT VI at the same time. They run, but in RT VI the mentioned error appears. I've also tried to use the Open FPGA VI Reference Function" tool chain in the RT VI, but the low level SPI functions work without the error only after the Reference Function chain is closed - which also turns the FPGA VI (and the clock with it) off. The FPGA VI and SPI llf-s have the conflict of reference, one pointing to the custom and the other to default FPGA personality - I think that's why the error appears.

 

I've checked the structure of the SPI low level functions. At the very bottom they use the Open FPGA VI Reference Function tool chain to connect to the default FPGA personality with the RT VI. I'll try to build my RT VI with this tool chain instead of the SPI functions, but it looks complicated 🙂

 

0 Kudos
Message 3 of 3
(2,275 Views)