Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Ohaus Ranger 7000 serial communication

Solved!
Go to solution

Hi,

 

I'm working on a VI to pull data from a commercial bench scale and store it inside an array until I get 10 readings, the thing is that I keep getting a 0 after each reading occupying an additional space in the array, I assumed its the LF and CR causing this problem but I haven't been able to remove it. I followed another post solution where a search and replace string was used but so far I couldn't make it work. Data on serial terminal and NI MAX looks fine. I'm attaching both my VI and a screen shot of putty terminal. Any advice is greatly appreciated. 

 

Regards,

 

Alberto.

Download All
0 Kudos
Message 1 of 5
(4,071 Views)

Try using Trim Whitespace.  That should also get rid of the spaces it looks like you have before your number.


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 5
(4,068 Views)

Hi Crossruiz,

 

Just added the trim whitespace and didn't solve the issue, I even try adding a string subset function after the trim whitespace and no improvement. Is there a way to limit what goes into the build array conditioned to values larger than zero?, something after the string to number function.

 

Thanks.

 

Alberto.

0 Kudos
Message 3 of 5
(4,046 Views)

This is what I get on the Visa Test Panel

 

1: Read Operation
Return Count: 27 bytes
\s\s\s\s\s262.30\sg\s\s\s\s\sG\s\s\s\s\s\s\r\n

2: Read Operation
Return Count: 2 bytes
\r\n

3: Read Operation
Return Count: 27 bytes
\s\s\s\s\s262.25\sg\s\s\s\s\sG\s\s\s\s\s\s\r\n

4: Read Operation
Return Count: 2 bytes
\r\n

5: Read Operation
Return Count: 27 bytes
\s\s\s\s\s262.25\sg\s\s\s\s\sG\s\s\s\s\s\s\r\n

 

0 Kudos
Message 4 of 5
(4,044 Views)
Solution
Accepted by topic author a_ayala51

 Finally nailed it, I just had to change the enable termination Char to "F" in the  Visa Configure Serial Port. 

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