LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML Streaming to LabVIEW

How could I input a streaming XML data set into LabVIEW? The XML data are measurements from an Xtorr mass spectrometer. Any help would be greatly appreciated.

0 Kudos
Message 1 of 5
(2,526 Views)

xml files do not stream well.  in fact because of the dependance on DOMUserDefRef.dll they are not threadsafe.  TDMS files stream better.

 

a few more details would help.  What have you tried?


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(2,494 Views)

@physicalchem wrote:

How could I input a streaming XML data set into LabVIEW? The XML data are measurements from an Xtorr mass spectrometer. Any help would be greatly appreciated.


Does your Mass Spec "spit out" XML?  An XML file has a particular structure, with required elements at the beginning and the end.  If your instrument is, indeed, spitting out what will eventually be a "legal" XML file, just over a period of time (minutes/hours), and you want to capture it all (in LabVIEW) and analyze it, that shouldn't be so difficult.  It's just text, for goodness sake -- read in text from the device when it's present, then turn around and write it to your (previously-opened) output file.

 

Once all the data have been written and the file has been closed, you should have a "legal XML" file that you can then re-open with LabVIEW and parse to get the data out of it.

 

If, on the other hand, you want to extract the XML data "on the fly" as it's coming in, this is a bit more difficult.  There are some packages that can probably do this (particularly if you know the expected structure of the XML data, and can "cheat" a bit in your code).  You might want to take a look at NI GXML, available (for free) from NI using the VI Package Manager (installed with LabVIEW 2013, or downloaded from the Web) -- you may be able to adapt some of their routines for your use.

0 Kudos
Message 3 of 5
(2,478 Views)

How would it be possible to convert XML Streaming to TDMS Streaming? I have a streaming XML window that constantly aquires data.

0 Kudos
Message 4 of 5
(2,378 Views)

Hi,

 

Do you know the expected format of the XML file or more information about the device? Is the XML file sent out in pieces or are they separate files? Based on how the XML file is being output, the method that works best would vary.

Evan See
National Instruments
0 Kudos
Message 5 of 5
(2,341 Views)