From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-14-2024 06:31 AM - edited 05-14-2024 07:06 AM
Hey
I'm using the NI-9223 module. I want to be able to choose which inputs I want to acquire every time I run the VI. For that I used a lot of case structures, I tried on simulation and it functions. But when I tried to compile the code I got this error "Array Does Not Resolve to a Fixed Size".
I thought all of the arrays I used were with a fixed size, but now I'm not sure. Is this error occuring because for each case I have a different array wired to the output tunnel?
And is this case structure the best solution to dinamically choose the inputs?
Solved! Go to Solution.
05-14-2024 07:27 AM
You have different lengths of arrays going to the same output tunnel in different cases. For instance, case 0 has an empty array while case 1 has a 1 element array. Since the maximum length in the cases is 4, you need to make all of the output arrays a length of 4. To help your FIFOs, you can also output the number of elements that need to be sent (wire to the N on the FOR loop).
05-14-2024 07:50 AM
What do you mean "to help your FIFOs"?
05-14-2024 08:05 AM - edited 05-14-2024 08:06 AM
In my opinion, it is a waste of FPGA resources to have multiple relatively similar cases, with only one of them being active and the rest remaining idle most of the time.
I would program to write all 4 channels to the FIFO, then filter the data from selected channels on the host size.
05-14-2024 08:16 AM
@ZYOng wrote:
In my opinion, it is a waste of FPGA resources to have multiple relatively similar cases, with only one of them being active and the rest remaining idle most of the time.
I would program to write all 4 channels to the FIFO, then filter the data from selected channels on the host size.
This is good advice. The only difference I would do is wire up the N to the FOR loops that write to the FIFOs. Doing this, the FPGA can limit what data goes up to the host.
05-22-2024 07:29 AM
Thank you guys!