03-18-2018 07:41 PM
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.
03-18-2018 08:48 PM
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
03-18-2018 09:02 PM
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".
03-19-2018 06:58 AM
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.
03-19-2018 10:24 AM
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.
03-19-2018 01:39 PM
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.
03-19-2018 02:03 PM
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.