05-01-2014 02:31 PM
I am developing a cRIO application that has an array of 23 controls in the FPGA. The FPGA Interface C API Generator defined them as a name and size.
typedef enum
{
NiFpga_ControlArrayU32_Setpoints = 0x8118,
} NiFpga_ControlArrayU32;
typedef enum
{
NiFpga_ControlArrayU32Size_Setpoints = 24,
} NiFpga_ControlArrayU32Size;
How would I reference the 15th setpoint, as NiFpga_ControlArrayU32[15] or as an offest to 0x8118?
Solved! Go to Solution.
05-02-2014 10:16 AM
Hi Paul_Knight,
When the C headers are generated, there should be one called NiFPGA.h.
There is a function within this header for reading a U32 array. The function is called NiFpga_ReadArrayU32. Here is some documentation on the various read array functions.
http://zone.ni.com/reference/en-XX/help/372928G-01/capi/functions_readarray/
You should be able to read the array values and store them into an array in C. Then you can access them as you would normally within your C program. Hope this helps!
05-02-2014 10:57 AM
Thanks, I should have looked there first.