LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

formula node error

Solved!
Go to solution

Hi there - I've written a little VI as below and it doesn't like the formulas. I can't for life of me see whats wrong and I've done similar things before.

I'm sure it is something really simple.

Any help greatly appreciated.

Cheers

Jack

error.jpg

0 Kudos
Message 1 of 3
(2,651 Views)
Solution
Accepted by topic author jnaumann

You are creating a 2D array with the first small loop because of incorrect and overly complicated coding. This means you get a 1D array inside the second loop for "t".

 

Why do you generate a single number then use a Rube Goldberg code to initialize an empty array then insert that number in it, leaving you first with a 1D array with one element which then turns into a 2D array at the loop boundary. All you need to do is wire the output of the multiplication to the loop boundary.

 

In fact, you don't need that first loop, you can do both in the second loop. Simply multiply [i] with the factor and wire to the "t" input of the formula node.

 

I don't understand why you even want to use a formula node. Most likely all you need are a few atomic operations. Can you attach the actual VI?

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

Thanks - for some reason I thought I needed to create an array of the times, completely forgetting the for loop would do this. I have deleted the first loop and wired the multiplication straight into the loop and it works now.

 

Thanks again

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