LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW FPGA (cRIO-9049) puts a coercion dot where there shouldn't be one

Solved!
Go to solution

Hi! I am working with LabVIEW 2023Q3. I am developing a simple FPGA application just to read some channels of some NI 9208 modules. I took inspiration from the "NI 9208 Getting Started.lvproj" example project selected from the help menu. I copied the setup from the example VI inside the FPGA target (NI 9208 Getting Started (FPGA).vi). Here is the example VI in question:

RiccardoPragmaeng_0-1791446811233.png

 

And in my own project, I've modified (simplified) this VI to just this (it's just for testing purposes):

 

RiccardoPragmaeng_1-1791446890126.png

 

However, as you can see, there is a coercion dot on the "CurrentData" indicator. This is because I tried compiling the unmodified example and it gave me an error about the

array sizes not being fixed; fair enough. This is the setting on the array indicator for NI's own example project; as you can see, it correctly auto-detects that the input array has a fixed size: 

 

RiccardoPragmaeng_2-1791447046645.png

 

However, when I try to do "adapt to source" in my own project, this is what I get:

 

RiccardoPragmaeng_3-1791447154965.png

 

As you can see, I get the detected array size as variable (and NO coercion dot). If I change the array size to "fixed" and set its size to 4 (as there are only 4 inputs to the build array function), I then can compile the FPGA target but I get a red coercion dot (as you can see in the second image of the post), and I don't know why. The data type of the elements of the array is the same fixed point format, I don't know which other settings to check honestly; maybe I'm missing something obvious here, any help would be appreciated.

0 Kudos
Message 1 of 2
(1,073 Views)
Solution
Accepted by topic author Riccardo Pragmaeng

UPDATE: Nevermind! I've found the setting that needed to be checked inside the VI's properties menu, under "Execution": "Autopreallocate arrays and strings" needed to be set.

0 Kudos
Message 2 of 2
(1,056 Views)