LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formula node with coefficient array

Solved!
Go to solution

Hello everybody!

First of all I want to thank you all this forum because It is helping me very much with the question, thanks!

And now my doubt,....

I have an array of measured values, and I need to use this in a formula to convert the voltage measurements in temperature. 

In this equation I have of coefficients that I wanted to extract from a table or array.

Trying to solve this,.I converted the array into a cluster and send to formula node inside a for loop.

Before I inserted the cluster and wrote the coefficients manually, the program was working, but now It doesn't

I made the program run with the " lamp" and noticed that, in my for loop, the " I"  doesn't increase..Any  suggestions?

Thanks forward for the help.

Leandro

 

Download All
0 Kudos
Message 1 of 5
(3,239 Views)

Hi leandrodzc86,

"in my for loop, the " I"  doesn't increase.."

You have connected Numeric value (10) to the N terminal of 'for loop', you are also connecting arrays to for loop (With auto indexing enabled).

Check sizes of all array.It should be same otherwise it will run for number =Minimum array size.

Example,

N terminal value is 10

Array1 size=5

Array2 size = 1

then for loop will run only once. I hope I could explain you the problem with your code.

 

Best of luckSmiley Happy

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 5
(3,225 Views)

This is the program with the written coefficients.

I will use the manually one, but I wanted the possibility to change the value of  them.

regards

Leandro

 

Download All
0 Kudos
Message 3 of 5
(3,222 Views)

Hi,

If you think coefficients may change later why don't you use text file(ini file)?

Write youe coeff. there with tab delimeter and then read them using read ini function.

also in your latest image i found build array with "t" at  all its inputs.

for you can use initialize array.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 4 of 5
(3,215 Views)
Solution
Accepted by topic author leandrodzc86

Ok . I am kind of new in LV.

I didnt know about the index and it influence into the for loop,thanks, It helped a Lot. I don t know how to use the commands you said, but I found an alternative. Maybe ( and I am quite sure) that It is not the best one, but works.If you gak, or anyone that reads this has other idea, post here. I am interested to know.

After I will take a look in these commands you said to learn most about it. 

thank you very much

 

Leandro V. Zaccarias

FEM-UNICAMP

 

 

0 Kudos
Message 5 of 5
(3,204 Views)