LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to collect correct data format from visa read

Solved!
Go to solution

Hi,

I'm new in labview. I'm making a labview software to control and collect data for ASL F900 Thermo Bridge. But I don't know how to get correct data format from visa read.

Example:

The Correct data format is: +0.123456789E\r\n  (15 bytes)

but sometimes data format which i receive is 56789E\r\n+0.1234 or .123456789E\r\n0

 

I attached F900 user guide!

0 Kudos
Message 1 of 5
(3,865 Views)
Solution
Accepted by topic author VMI

Hi VMI,

 

but sometimes data format which i receive is 56789E\r\n+0.1234 or .123456789E\r\n0

When initializing the serial port you should enbale the TermChar and leave it's default setting for "0x0A" = LF = "\n". Then just read something like 99 bytes per VISARead: you will receive full messages (after the first message).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,848 Views)

Hi GerdW,

 

It's work, thank you so much.

 

One other question, How to increase precision (number of digits after dot or comma of floating number) of data which export to excel by write to measurement file.vi?

default is six digits after dot, but I want to increase to 9 digits?

0 Kudos
Message 3 of 5
(3,826 Views)

You can't, you will need to use a different function for writing your data to the file which allows you more control over the format of the data. The write to spreadsheet file in the File I/O palette allows you to specify the precision of the data or you can use the raw file functions to format the data in exactly the way you want.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(3,821 Views)

@VMI wrote:

Hi GerdW,

 

It's work, thank you so much.

 

One other question, How to increase precision (number of digits after dot or comma of floating number) of data which export to excel by write to measurement file.vi?

default is six digits after dot, but I want to increase to 9 digits?


It would help if you supplied some code so we could see how you are saving the data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(3,805 Views)