Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

extra characters appearing when using VISA

Solved!
Go to solution

Hi, I am new to labview and have a problem I've been working on for a few days. I am reading masses printed from a scale hooked up by a RS-232 to USB connection, with the ultimate goal of recording mass vs. time. Currently random letters appear in the mass at various times and cause the waveform chart to drop to zero, Looking at the signal using another program I am getting a constant  mass reading. Searching the forums I have not been able to find a way around this problem. Any help would be . I attached my current program to the bottom to better explain my predicament. 

0 Kudos
Message 1 of 5
(4,676 Views)
Why are you using the run continuous mode? The stop condition of the while loop is also wrong. It should be stop when true.
0 Kudos
Message 2 of 5
(4,673 Views)

I am running in contiuous mode because it seems to be the only way to get the nummerical output, same with the stop condition, I need to have the loop off in order for the number to be displayed. I am sure there is a better way to get this to work.

0 Kudos
Message 3 of 5
(4,666 Views)
The better way is to use the correct stop action and not run continuous. Please provide error message/code that you get.
0 Kudos
Message 4 of 5
(4,662 Views)
Solution
Accepted by X-rayChemist

1. Use a proper Stop button.

2. Set the loop's termination condition to be Stop When True.

3. Do not use the Run Continuously.  What you are doing here is constantly reinitializing the serial port, which is likely causing data to be missing and giving you your weird results.

4. Close you port after the loop.

5. There is no need at all for that property node.  You can define what the termination character is with the Configure Serial Port.


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
Message 5 of 5
(4,631 Views)