LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW SubVI output separation

I am not sure if this is possible, but I need to separate the output of a subVI function into individual numerical values so that I can use the values to perform math with the values.  Is there a LabVIEW function that would allow this to happen?  This is for a senior design project where we are attempting to implement machine vision.  Any advice would be greatly appreciated. 

0 Kudos
Message 1 of 7
(3,181 Views)

Since I have no idea what you mean by "separate the output of a subVI function into individual numerical values", I have no suggestions to make (except, perhaps, explain your task more clearly).  If you get a (single) number out, you can do lots of processing with this number and then "perform math" (whatever that means) with the results.

 

Bob Schor

0 Kudos
Message 2 of 7
(3,163 Views)

Reading between the lines I assume that your single output is an Array. In which case the (many) functions in the Array palette would be worth looking into, perhaps the one with the idiom "index".

Message 3 of 7
(3,162 Views)

Perhaps if you told us what the output data type of your VI was, we could help.  If a cluster, use Unbundle By Name.  If an Array, use Index Array or Array Subset.  Beyond that, you need to supply A LOT more information if you want any kind of help.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,128 Views)

I apologize for the lack of technical details, that comes down to my inexperience with the program.  I attached file in question to this reply.  That will hopefully provide more answers than I can provide.

 

I need the edge coordinates as values for manipulations.

0 Kudos
Message 5 of 7
(3,111 Views)

The output of the IMAQ Find Edge was an array, so thank you for clarifying the difference.  I am attaching screen shots and the program file in an attempt to clarify what I am attempting to accomplish.  I apologize as I know this aren't the technical terms, but I need the Straight Edge coordinates as individual integers so I can store the value.  The value is the Y-pixel coordinate of the edge shown in the screen shot.

0 Kudos
Message 6 of 7
(3,078 Views)

I assume you are referring to the outputs of the IMAQ Find Edge VI? Context Help (Ctrl-H on Windows) is your friend. Open this and then hover over the terminal of interest to see detail on what it is. For example I hovered over the "Straight Edges" terminal and it told me that it is an array of a custom data type (which we call a cluster, also known as a struct in other C-oriented circles). If I wanted access parts of this entity I would need to index the array first to get to each cluster item and then unbundle the cluster (by name would be helpful) to get to the appropriate element of the cluster. Using this thought process have a go at how you would approach your problem and give us a shout back with your progress.

 

2018-03-20 07_57_04-Win7x64 NI2016 - VMware Workstation.png

 

 

0 Kudos
Message 7 of 7
(3,073 Views)