LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting information about specific array element

CheckField.png

Omar
0 Kudos
Message 11 of 14
(439 Views)

 


@Omar II wrote:

I think some of your problems is the init of the feedback nodes in the sub VI.

Each time it is ALWAYS initialized to InputArray so the two array will always be equal.

Plus the SumOfErrors feedback is ALWAYS an EMPTY array.


No the feedback nodes are globally initialized, so they only reset with each new run of the toplevel VI. They reset on the very first call and then never again as long as the application keeps running.

 

0 Kudos
Message 12 of 14
(438 Views)

The cards which will produce the data go from 0-FFFF, so using feedback I could be comparing and subtracting wrong values and creating negative outcome, thus the add of the FFFF ( I might not explain it correct to you....)

@ : If I don't connect the N will the I still work correctly? ( probably it will )

 

@ Omar II : The program is meant to be run once for a periode of time and produce certain results, as i have mentioned a bit before, so i don't think that the two arrays being the same is a problem. Thanks for noticing though.

Also.. from NI help : " The Feedback Node uses the value you wire to the initializer terminal as the initial value for the first block diagram execution or loop iteration. "

it is the same case with the SumOfErrors feedback.

I need to check for the overflow so i need to check element by element.

0 Kudos
Message 13 of 14
(421 Views)

 


@Eleftherios wrote:

The cards which will produce the data go from 0-FFFF, so using feedback I could be comparing and subtracting wrong values and creating negative outcome, thus the add of the FFFF ( I might not explain it correct to you....)

@ : If I don't connect the N will the I still work correctly? ( probably it will )


 

In this case make the datatype U16 and things will wrap correctly without the need for the comparison and the little case structure. Try it.

 

Without N wired, it will work better because you don't have to worry about making changes when the arrays change size.

0 Kudos
Message 14 of 14
(412 Views)