I am working with an Anritsu MS2722C Spectrum Analyzer and attempting to recieve as fast a communication time as possible. So far, the visa function calls I make ( viPrintf / viBufWrite viReadStr / viBufRead ) seem to be taking roughly 100ms each, much too slow for the project I'm working on.
Does anyone have ideas as to how I can speed up the communcation time to the device in software? It seems like maybe I am missing something in maximizing the efficiency of the VISA library, as it seems to me that the communication time should be much faster than this.
I'm sorry if this question is in the wrong spot or has been already answered, but I didn't see much discussion about library efficiency anywhere.
You may want to try enabling jumbo frames (similar to this knowledgebase) by opening up Windows Device Manager and right clicking your network adaptor and selecting Properties. Go to the Advanced tab and hopefully you can select Jumbo Frames in the selection box and then change this value (here is a good article explaining jumbo frames more).
Ethernet is inherently a slow communicator, depending on how you have your system setup; this could be the fastest it can communicate.
Hi Ever Song,
Thanks for the response! The real problem I'm having isn't so much with the data transfer rate though, the speed at which the actual data transfer happens is fine (if I were to say, transfer a large file, the operation completes in say 130ms .. only 30ms longer than making a simple call with very little data transfer). So while the jumbo frames are a decent idea, that's more of a low-level speedup for data transfer rates, and I'm not sure it will really help me
I'm speaking in terms of VISA library overhead, or some sort of overhead from establishing a connection, as sending even the simplest command is taking around 100ms. (the call itself blocks for this time). If anyone has had any experience with using the visa libraries (particularly with a spectrum analyzer) I'd really like to hear about what kind of communication times you were able to achieve.
The latency is determined by several things including you NIC, the network, and the device itself. 100ms sounds like a pretty good communication time though. I imagine you are connecting straight to the device, but any network overhead could slow down the communication.
I had a similar issue a year or so back. I was trying to get data from multiple bluetooth devices. I tried using Visa to access them but ran into the same latency issue when I started multithreading. I switched to using bluetooth over sockets (Visual C++) and all was fine. I suspected it was an overhead in the NI Visa implementation somewhere and may have even posted about it here, but I'm not sure.
Sorry this isn't really any help in fixing your problem, but it goes some way to showing that this probably isn't an ethernet problem as has been stated.