Hello,
i have a problem.
I am writing a C code and i have to edit an existing Labview code.
My big problem is with the CFN that i dont know how to get the data from the array of structs with integer (array of 16 structs with 7 integer elements) into an array of cluster of 7 integers.
I tried it with struct {..7 integer (each uint16_t)..}table; struct table[16];
"int32 func (struct *pointer)" and memcpy( pointer, table, sizeof(struct)*16); , and then my labview crashes without any error warning. And i found out via debugger from visual studio, that i think memcpy is saving his data into the memory of labview where it isnt allowed to save it.
so my first question is:
1) if i make a numeric constant and bundle 7 types of it to one cluster and use "build array" and make all of this before the CFN, is the memory for this allocated and the value is "0"?
Second:
2) how much bytes are allocated for this? How can i look how much bytes does an array of 16 cluster with each 7 uint16-integers need?
3) What is the difference between Call Library Function node and "call interface node" exactly?
4) If i have another three function in C which copies some data into the C array "table" how can i get the data from this "table" into Labview when i only have the possibility to return void, numeric or string??
Because as far as i know i need in Ansi C for the array of 16 structs with 7 uint16_t-Integers 224 Bytes (16*7*2Bytes) . Am i correct by this?
I think the most problem is about the memory handling here.
About help i am very grateful.
Sincerly
Labviewbeginner