11-07-2014 11:28 AM
I have a string which is an error as output from a Mathscript module. Because the string is an output of the Mathscript module, it is labeled as the name of the variable in the Mathscript module.
What I want to do is concatenate the string's label so that it precedes the string. In essence, when my error is returned (which is a generic error from a Matlab function), I want to know what variable (i.e. which sensor) is causing the error. So it will say something like "Label - Error Text".
I've seen examples on the forum of finding the label of a numeric indicator, but using that method doesn't seem to work for non-numeric datatypes.
11-07-2014 11:53 AM
Use the label:text property of the string control (or indicator) that you are getting the error string from.
Then just concactenate the label text from that property along with maybe a '-' and then the error text itself to another string indicator in labVIEW.
11-07-2014 12:18 PM
It's not really a control or indicator. It's an output from the Mathscript node.
I've attached a picture with the context help while hovering over the wire itself to explain a little better. I want to return the text "Rh_error" for this specific example. I see what you mean, but I don't see that option available for my case (it's available for that indicator titled "output" though).
11-07-2014 01:41 PM - edited 11-07-2014 01:43 PM
@twolfe13 wrote:
It's not really a control or indicator. It's an output from the Mathscript node.
I've attached a picture with the context help while hovering over the wire itself to explain a little better. I want to return the text "Rh_error" for this specific example. I see what you mean, but I don't see that option available for my case (it's available for that indicator titled "output" though).
I know it's not necessarily the most elegant solution, but you can rename the indicator to whatever you want and then use the property discussed above. But hmmm, I would've expected that if you right-clicked on the output to make the indicator, it would've taken on the name of the array.