01-24-2024 04:37 AM - edited 01-24-2024 05:14 AM
Greetings,
I am currently working on programming an NI 9237 with FPGA to measure a strain gauge. This is my first attempt at programming with LabVIEW, so I am taking it step by step. Initially, I want to set up a waveform chart in RT-VI and check if the program can transfer data successfully. After that, I would like to implement 'Shunt Calibration' and 'Offset' options.
I have come up with a solution that works so far, but there are issues with RT-VI on the Front Panel. In the Front Panel of the FPGA-VI, the 'Excitation Voltage' and 'Data Rate' controls are 'rings,' where the user can select the desired settings from a drop-down menu. However, in RT-VI, these options are 'numeric properties' with a u8 data type. I tried to replace them with a ring-type Front Panel control, but in this case, the drop-down menu did not have any options. Additionally, in FPGA-VI 'Excitation Voltage' and 'Data Rate' controls are "Type Defs", but in RT-VI not. What am I doing wrong?
Thanks.
Solved! Go to Solution.
01-24-2024 07:15 AM
Hi amm0gus,
This is expected because the "lvbitx" format (compiled FPGA VI) does not support exporting Type Definitions, which is why all FPGA controls are automatically disconnected from their typedef when seen from the outside (understand: from the host code). This is also why DMA FIFOs elements are also disconnected from their typedef. By extension, I guess NI chose to also disconnect typedefs for Target-Scoped FIFOs, Registers, Memories, Handshakes, even if they do not interface with the outside.
The specificity with a Ring is that, unlike an Enum, its items are not part of the data type, so they are completely lost when the typedef is disconnected. Then you are left with a plain U8/U16/U32 integer.
So to solve your problem, just copy the typedef-ed controls from your FPGA to your RT. There will be coercion dots, but this has no impact on data or even performance:
Regards,
Raphaël.
01-25-2024 04:23 AM
Thanks Raphaël, it did work.