Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Format data saved by

Hello,
 
My application reads NMEA messages on a serial interface. Separate the message into usufull data. All data is integer values then I use a merge function to combine five values into one signal wire. Then I write the data to a file using the "Write to Measurment File" component. 
 
My problem is that my data is integer and I want it to be written to the file as integer but it gets saved as doubles with 6 decimals.
 
Does anyone got a solution to this?
0 Kudos
Message 1 of 4
(3,397 Views)
Hi

Instead of write to measurement file you can use write to spreadsheet file.
Open that vi and change the 2d array, and 1d array representation to integer.

and save this vi with an ew name in your project.

Further connect %d to the format string.

this is a much simpler function and works already nicely since LabVIEW <version 3
greetings from the Netherlands
0 Kudos
Message 2 of 4
(3,386 Views)
You could convert the Express VI to a regular VI by right clicking on it and selecting "Open Front Panel". You could dig way down through all of the subVIs until you find where the data is converted. I have not done this and not sure how deep you will have to go or whether all of the subVIs are even accessible. The simplest thing is to just use Write to Spreadsheet File and select type as Interger. You don't mention which version of LabVIEW you are using but if you have an older one where the Write to Spreadsheet is only for dbls, you could try setting the format to %.0f. Another way is to use the Array to Spreadsheet String function with a %d format string and then a Write to File.
0 Kudos
Message 3 of 4
(3,386 Views)
Thank you for the information, for the record i'm using newest version 8.5.
0 Kudos
Message 4 of 4
(3,374 Views)