Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA timing

I'm fairly green when it comes to VISA (very green). I am attempting to modify a VISA example to read the values off a scale. What I want is for the readings to come at a user-selected time interval (seconds to minutes) and just throw away the rest. With the current example I'm getting a ton of data, to the point where a change in the mass read by the scale display is taking 10's of seconds to be reflected in the VI. Thanks for any help you can offer. 

0 Kudos
Message 1 of 3
(2,068 Views)

I would convert the string to a number and compare it to the previous number.

If the difference is bigger than a certain value I would store the value and the timestamp.

Check LabVIEW tutorials how to do this.

greetings from the Netherlands
0 Kudos
Message 2 of 3
(2,058 Views)

1. Get rid of the wait in the loop.  The read will limit the loop rate for you.

2. Stop keeping all of the old data.  This includes that Feedback Node and the Concatenate String.

3. Make sure Read Count is significantly more than the longest message you ever hope to read.  This will make sure your read ends with the termination character and therefore ensure you got a complete message.

4. For your testing purposes, I would change the Number indicator into a chart.  The chart keeps a history itself and will give you a nice idea of what is happening to the values.

 

In the end you will want this loop to be running on its own and sending data out to somewhere via a Queue or User Event (learn Producer/Consumer).  You could use the Elapsed Time express VI to conditionally enqueue the value every X seconds.


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 3 of 3
(1,985 Views)