LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure with value changes

Solved!
Go to solution

only "0" in the index array because the search array function stops searching when it finds the first one. I don't know how to fix this 😞

0 Kudos
Message 31 of 92
(1,391 Views)

So the search function only finds the same first element that has Flow ?

 

Have you looked at all the inputs for the search function ?

There are one input you haven't used. Could that help you ?

0 Kudos
Message 32 of 92
(1,379 Views)

I know I haven't used "start index" but I can't figure out what to wire to make it work properly. I already tried"array size" or "array index" or "+1" , but it still didn't give me the corrects values. Could you please give me an idea?

0 Kudos
Message 33 of 92
(1,376 Views)

I'm looking at the code and reading the posts, but it isn't clear what this program is supposed to do.

We can make it do things, but if the description of what it is supposed to do isn't clear, then it's tough to suggest anything.

 

Is this some homework that you need help with?  If so, can you post what it is supposed to do or what the original description was?

 

EDIT:  Lost connection to the forum, so this post may be out of sync...

0 Kudos
Message 34 of 92
(1,368 Views)

@ Ray-R

 

Ok I'll try to explain it pretty clearly again. The purpose of this vi is to make to user be able to change the unit (Flow unit and Pressure unit). When he change the unit (for example; flow unit), all flow values should change to be correct values (ex. 4 L/min = 240 L/hr). All changes should occur in the same array. As you can see in my vi or the posted picture, I tried to arrange the array of all names from the daya mainstream, then I made the array if index number where the values change and so on... If you understand, could you please take a look at my code? and give me some suggestions or fix my code to reach the goal I expected?

 

Thank you

0 Kudos
Message 35 of 92
(1,363 Views)

Okay, let us break it down.

 

When the loop starts, from where in the array should the "Array search" function start searching ? index 0 or ... ?

 

Next iteration of the loop, from where in the array should the "Array search" function start searching ?

 - index 0 ? ( What index would it find, the same as last or a new one ? )

 - index 1 ?( Why index 1 ? )

 - index from last found + 1 ? ( Why ? )

 

Spoiler
You need a shift register and a add 1.

 

0 Kudos
Message 36 of 92
(1,362 Views)

index from last found  +1. I tried it but still didn't give me a correct value

 

labview4.jpg

0 Kudos
Message 37 of 92
(1,355 Views)

Can you just put it in my vi? I surrender 😞

0 Kudos
Message 38 of 92
(1,346 Views)

No no, don't give up.
I will help you, but you have to do the work.

You have to learn it, not me.

 

So what did come in the "index array" ?

Post the values and explain what you think was wrong.

 

And from the look at you picture. What is it you have implemented ? try to explain it. 

Because it is not "last found index + 1".

 

0 Kudos
Message 39 of 92
(1,340 Views)

The values appearing in the index array are 0,2,2,4,4 which is not correct. It's supposed to be 0,2,4 (only 3 elements) I tried to use array size because the size of the array ia increased by 1 each time, so I think it might be working but it isn't.

 

I know it should be +1 from the last found but no idea about which function to use 😞

 

Anyway thanks for helping me. (hopefully till the end :))

0 Kudos
Message 40 of 92
(1,330 Views)