LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increase speed visa read write

Solved!
Go to solution

Hi guys,

 

I am using the visa read and write example, but I am facing some issue when using it in a larger software, and I can only receive date when the vi has been slown down (using the lightbulb).

 

The programme definitely works on it own with the settings defined. 

 

Therefore, do you have any ideas/suggestions on how to increase the speed of this vi (attached) significantly? Also, it seems to create an issue with the data read

 

Many thanks,

 

Kentmey

 

 

Kentmey
0 Kudos
Message 1 of 4
(4,144 Views)
Solution
Accepted by topic author Kentmey

Get ride of the Bytes at port and the delay.

Rely on the termination char 

Use some number larger than the bytes expected.

 

 

 

 

Omar
Message 2 of 4
(4,131 Views)
Solution
Accepted by topic author Kentmey

How are you using this code inside of another VI?  If you are actually calling this VI, there needs to be some changes.

 

1.  The port should only be initialized once at the beginning of your program and clsoed once at the end.

2.  There shouldn't be any  need for the bytes at port.  You are set up to use a termination character.  So just set the number of bytes to read to something really large (like 50 or 100) and let the VISA Read stop when it finds the termination character.


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

thanks everyone, it is working now quite well.

 

I also changed from asynchronous to synchronous, that made quite a difference as well 🙂 (wasn't sure it would but that was the biggest speed improvement).

 

Kentmey

 

Kentmey
0 Kudos
Message 4 of 4
(4,036 Views)