black1234572 Posted May 28, 2017 Report Share Posted May 28, 2017 Can someone explain the use of Data type parsing? Thank you Quote Link to comment
Darren Posted May 28, 2017 Report Share Posted May 28, 2017 Assuming you're talking about the Data Type Parsing VIs in LabVIEW 2015 and later, you can read the documentation on them. Or you can watch my Hidden Gems presentation in which I describe some use cases for their predecessors, the VariantDataType VIs. 2 Quote Link to comment
hooovahh Posted May 28, 2017 Report Share Posted May 28, 2017 Thanks Darren, I'd just like to add that these are useful for when you are trying to design more generic functions that can do different things based on different data types, or developing code that can works on data types in ways that would otherwise have to be hard coded. Here is a (poor) example. Lets say I want to write a subVI that will take in a cluster, and will increment every numeric in the cluster, but leave all the other data types alone. How would you do this? Well with these functions you can look at the Variant input, and determine what the data types are of the things contained in the cluster, and if it is a numeric, convert it to the numeric, increment, and put it back in the cluster. Certainly if you needed something like this you could write a static VI that works on your cluster but you'd need to create a new subVI for every cluster data type you have. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.