hooovahh Posted July 25, 2014 Report Share Posted July 25, 2014 I noticed today that the "Get Default Data From Variant" and the "Get Default Data From TD" under the LabVIEW Data palette doesn't support variants. So if I provided say a cluster with 4 elements in it, one of which was a variant, this function could not return the default data for this cluster because when it gets to the variant it throws an error. I found this when trying to use this function with the Waveform Data type which contains a Variant for attributes of the wave. Is there a reason that Variants get lumped into the same case statement as the Null data type? Shouldn't it have its own case for Variant and return a null variant constant? Also is a easier way of doing this just to have a for loop that runs 0 times passing the data in and out? EDIT: Actually it looks like in addition to variants not being fully supported, neither is waveform data types of many kinds. Quote Link to comment
Rolf Kalbermatter Posted August 8, 2014 Report Share Posted August 8, 2014 I noticed today that the "Get Default Data From Variant" and the "Get Default Data From TD" under the LabVIEW Data palette doesn't support variants. So if I provided say a cluster with 4 elements in it, one of which was a variant, this function could not return the default data for this cluster because when it gets to the variant it throws an error. I found this when trying to use this function with the Waveform Data type which contains a Variant for attributes of the wave. Is there a reason that Variants get lumped into the same case statement as the Null data type? Shouldn't it have its own case for Variant and return a null variant constant? Also is a easier way of doing this just to have a for loop that runs 0 times passing the data in and out? EDIT: Actually it looks like in addition to variants not being fully supported, neither is waveform data types of many kinds. The OpenG LabVIEW Data Toolkit's origine date from LabVIEW 5 or so times when waveforms, timestamps etc. were not yet present. Some of that was added later by whoever found to need that particular datatype support, but usually not in a structured manner either but just in the particular functions that happened to be used by that person and sometimes only to the limited extend that was required by him or her. I don't think there is any other reason to the lack of full support for the datatypes that you noticed, other than that they didn't exist back then or that the original developer decided that they were unneeded or to cumbersome to implement for the moment. You usually have to cut a line somewhere when developing such a large and involved library as this. If you start with the intention to support everything and all and handle every corner case you won't get ever to a state where you have a working library at all. 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.