02-21-2018 11:08 AM
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?
Solved! Go to Solution.
02-21-2018 04:21 PM
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?
02-22-2018 04:23 AM
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 🙂