What you need to do is query the instrument for the data and then use the built in file I/O functions in LabVIEW. You may have to make several queries (i.e. trace data, specific measurements) if there is no instrument specific command to read all data. If you can provide more details on the nature of the data you want to save (array, scalars, etc.) and how you want the text file formatted, it would hlpe to provide you with a more specific answer.