Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial-Data LVDT

Hello,

 

I have a LVDT connected to my COM1 serial port. This gives me around 7000 readings when I read the COM Port. It outputs a string like "N  +0.642...."  to signify the flatness of a section. The problem is that I am getting a string (Read Data) like shown in the VI and am not able to convert it into an array of readings in DBL format, which is required for further processing. 

 

I have attached the VI that I am using.

 

Thanks,

 

James

0 Kudos
Message 1 of 2
(1,032 Views)

1. I would change your termination character to be a Carriage Return (13).  Then each read will be a single measurement.

2. Use Match Pattern to find "N " (notice I have a space in there).  Then the "after substring" will be your number.  Use Fract/Exp String To Number to convert it into a DBL.


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 2 of 2
(1,020 Views)