02-29-2008 02:26 AM
03-04-2008 06:50 PM
03-05-2008 02:27 AM
03-05-2008 08:19 PM
05-08-2008 01:44 AM
Hi;all
I see the same problem here,using CVI 7.1. I'am trying to control a program written by a collegue over a VISA socket connection. Reading the socket with viRead() works fine, but writing with viWrite() goes to nirvana. And playing with the termination characters didn't change anything. My collegue said, that he is using CRLF as termination , but putting /r/n at the end of the string to be written didn't help. And no error messages seen in NI-Spy when running the program.
When digging documentation there is one question, I couldn't answer: What exactly does VI_ATTR_SEND_END_EN on VISA Socket resources ? The documentation for the Socket resources ( in CVI 7.1) says that it is supported , but the Documentation for VI_ATTR_SEND_END_EN mentions only VISA INSTR resources.
09-18-2009 09:45 AM
I'm having a similar problem with viWrite in a program we've written in C++ (VS2005). We constantly see extra characters getting dumped down to the instrument in question. Attempted tweaks to the termination character without resolve. We're explicitly checking any/all strings for their length and using this in the viWrite command, which appears to work since the status value returned doesn't indicate otherwise. Took some queues from the examples provided by the install (we're using VISA 4.5 by the way) and utilized instances of viFlush() and fflush(). Both only appear to resolve the issue temporarily and the same performance eventually reappears (typically after 5 correctly sent command iterations).
We have another tool we use for Ethernet/sockets communication that works flawlessly, but it would be nice to use a single tool (especially since the documentation indicates that it is a better or easier solution than typical sockets programming).