From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does LabVIEW C Generator generates multi-dimensional code or only vectors

Solved!
Go to solution

Hi,

 

What is the C generated code for a LabVIEW VI/block diagram using matrices?

This:

matrixVar[row][column] = value;

Or this?

matrixVar[row*Ncolumns + column] = value;

 

Thanks,

Ivan

0 Kudos
Message 1 of 7
(3,173 Views)

LabVIEW (Plain, RT, etc.) does not generate C code. It processes the diagram into machine code (via DFIR and LLVM).

(Details)

 

(... or are you talking about this rare beast for embedded targets?) 

0 Kudos
Message 2 of 7
(3,161 Views)

Yes, I am referring to that rare beast for embedded targets (why called rare beast?).

 

https://www.ni.com/en/support/downloads/software-products/download.labview-c-generator-module.html

0 Kudos
Message 3 of 7
(3,146 Views)

@LVCCGUser wrote:

Yes, I am referring to that rare beast for embedded targets (why called rare beast?).

 


Thanks, I noticed your other thread.

 

I called it "rare" because I almost never see it mentioned here. Maybe there is a more suitable forum (embedded, etc. ??), hard to tell for me. 😄

0 Kudos
Message 4 of 7
(3,143 Views)

Hi,

 

What is the C generated code for a LabVIEW VI/block diagram using matrices?

This:

matrixVar[row][column] = value;

Or this?

matrixVar[row*Ncolumns + column] = value;

 

Thanks,

Ivan

0 Kudos
Message 5 of 7
(3,090 Views)

Posted this question on that Labview Embedded threat. Thanks!

0 Kudos
Message 6 of 7
(3,138 Views)
Solution
Accepted by topic author LVCCGUser

LabVIEW multidimensional arrays are an array with the multiplication of all dimension sizes elements, not an array of pointers! It is also what most C libraries use because it is more standard and easier to handle.

 

Matrixes being in principle simply 2-dimensional arrays make no difference!

Rolf Kalbermatter
My Blog
Message 7 of 7
(3,131 Views)