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: 

integrating array (and staring too long at it)

Good evening,

 

I've got an array of time and 9 acceleration values (in columns).  I'm trying to integrate the array to yield velocity, but for some reason (and I'm assuming the hour is contributing here), it's not working to my expectations.

 

A relevant snippet of the code is attached.  Can someone with fresh eyes tell me where I've gone astray?

 

Thanks!

0 Kudos
Message 1 of 3
(2,231 Views)

Had a fresh cup of coffee, and found what I was overlooking.  Thanks for taking a look at the problem!

0 Kudos
Message 2 of 3
(2,225 Views)

From the looks of your code it appears that you would do well to spend some time with the Getting Started with LabVIEW tutorials.

 

-The use of stacked sequence structures is discouraged because it obscures code, is difficult to modify or extend, and often results in wires running backwards.

 

-Similarly local variables should not be used to pass data around - use wires. Locals are prone to race conditions, generate extra copies of the data, and are slower than wires.

 

-Use autoindexing to get the data from your array. You code will be substantially simplified.

 

There are Integration VIs in the Mathematics >> Integration & Differentiation palette which may be helpful. I am not sure these are in the Student Edition, but I think they may be.

 

Lynn

 

 

0 Kudos
Message 3 of 3
(2,175 Views)