04-03-2012 09:30 AM
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 😞
04-03-2012 09:50 AM
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 ?
04-03-2012 09:53 AM
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?
04-03-2012 10:00 AM
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...
04-03-2012 10:09 AM
@ 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
04-03-2012 10:09 AM
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 ? )
04-03-2012 10:18 AM
index from last found +1. I tried it but still didn't give me a correct value
04-03-2012 10:32 AM
Can you just put it in my vi? I surrender 😞
04-03-2012 10:46 AM - edited 04-03-2012 10:49 AM
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".
04-03-2012 10:57 AM
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 :))