mje Posted November 4, 2009 Report Share Posted November 4, 2009 So I'm working on making a generic algorithm for some sorting code of mine, using variants. Came across this little diddy: When examining the output, I get: 0x 001C 0054 ... The fourth byte (54) shows the type, but according to the documentation 0x54 is a waveform type. So I went ahead and wired up a waveform and I also get 0x54. Is this a bug? The two data types appear to not be equivalent (you can't wire up a waveform to a timestamp terminal, for example). Is there a way to differentiate between a waveform and a timestamp when using a variant? It now occurs to me I've run into this before but didn't dig deep enough...I recall running into unexpected waveform types when using EasyXML -michael Quote Link to comment
smenjoulet Posted November 4, 2009 Report Share Posted November 4, 2009 The fourth byte (54) shows the type, but according to the documentation 0x54 is a waveform type. So I went ahead and wired up a waveform and I also get 0x54. Is this a bug? The two data types appear to not be equivalent (you can't wire up a waveform to a timestamp terminal, for example). Is there a way to differentiate between a waveform and a timestamp when using a variant? You need to look at the next I16 value after the base type. 0x03 is a waveform; 0x06 is a timestamp. The current version of OpenG LVData/Variant tools don't catch this. But the NI tools (...\LabVIEW xx\vi.lib\Utility\VariantDataType\...) will catch it. Quote Link to comment
mje Posted November 4, 2009 Author Report Share Posted November 4, 2009 You need to look at the next I16 value after the base type. 0x03 is a waveform; 0x06 is a timestamp... Excellent, thanks! 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.