LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem regarding the formula node

i had an array of size 2000(8bit)

i want to extract bit 1 and bit0 of the even data of the array, (for example, array[0],array[2], array [4],etc... )and store them to a output1[]

then extract bit 5 and bit4 of the odd data of the array, (for example, array[1],array[3], array [5],etc... )and store them to a output2[]

then finally, extract bit 7and bit6 of the odd data of the array, (for example, array[1],array[3], array [5],etc... )and store them to a output3[]


i'm trying to use the formula node to implement it, however, facing some problems when using the formula node.

1. how to declare an array in the formula node?

2. how to set the output of the formula node to an array?


thks,lyn
0 Kudos
Message 1 of 4
(3,085 Views)
Read this (Indexing an Array Into a Formula Node) to get additional information. On how to declare arrar in formula node check Formula node - array manipulation in LabVIEW help. You can achieve same objective with a For loop as well (Is It Better To Index an Array Inside or Outside a Formula Node?)
0 Kudos
Message 2 of 4
(3,084 Views)
thks aderogba,

from the link you had given me, it only mention how to access the array, but it did not mention anything on setting the output to an array. is there any information regarding setting the output to an array?
0 Kudos
Message 3 of 4
(3,084 Views)
You may define an array in Formula Node in this form:
value_type Array_name[dimension_size];

ex:
float64 MyArray[100];
0 Kudos
Message 4 of 4
(3,084 Views)