LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to take a value from an array

i have this array, i want to get this value and do some algorithms with it, how do i take this value?
the value is circled
511




Message Edited by krispiekream on 03-19-2008 03:28 PM
Best regards,
Krispiekream
0 Kudos
Message 1 of 14
(3,417 Views)

Connect the array to the Index Array which u will find in Array pallete, 

Index the 0th row and 0th colume!!

0 Kudos
Message 2 of 14
(3,411 Views)
You will need to unbundle the cluster to get the array, then use the index array to get the element you want.
 
Off topic: You woudn't be working on old TV applications would you? An analog TV waveform has a "front porch" and a "back porch". I haven't seen those names in years. Smiley Happy
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 3 of 14
(3,406 Views)
what about this? how would i get 91.39 in my array?
i want to display 91.39 alone somewhere else in my program





Message Edited by krispiekream on 03-19-2008 03:42 PM
Best regards,
Krispiekream
0 Kudos
Message 4 of 14
(3,402 Views)
no..i am just tryinhg to learn labview.
i dont know what fontporch and backporch is. i am just montoring sensor

Best regards,
Krispiekream
0 Kudos
Message 5 of 14
(3,393 Views)
Hi krispiekream,

now you would need a simple "index array" node with 0 as index (as it's the default value, you don't need to wire itSmiley Wink)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 14
(3,391 Views)

just connect the array again to Index array. The index array automatically deletes the column element. And you index the 1st row.

It would be better if you try it once before you postSmiley Wink

Message 7 of 14
(3,390 Views)
that didnt work?





Message Edited by krispiekream on 03-19-2008 04:17 PM
Best regards,
Krispiekream
0 Kudos
Message 8 of 14
(3,381 Views)

I think you are missing with the data flow.

Make sure your indicator is written first, and then you read the data from the local variable(the attached diagram of yours). This can be achieved with sequence structures.(for just as a beginnerSmiley Wink)

0 Kudos
Message 9 of 14
(3,365 Views)


krispiekream wrote:
that didnt work?





Don't use a local variable or you'll get race conditions. LabVIEW does not execute left to right. Execution order is determined by dataflow. Most likely, you are reading the local varaible before the rest of the code had a chance to write to it. Please attach your VI. It is virtually impossible to debug an image. 🙂
 
Solution: I am sure you have a wire going to the array indicator. Just branch the wire and connect to the index array input.
Message 10 of 14
(3,358 Views)