03-26-2012 01:00 PM
03-26-2012 01:09 PM
Then what is the serial function you are looking to duplicate with the TCP Listen? Perhaps if you provided some details on the client/server design you have.
03-26-2012 01:25 PM
03-26-2012 01:33 PM
As I said, I think the only thing you can do is a VISA Read with a short timeout. I would imagine that your serial connection would work the same way then.
03-26-2012 01:58 PM
03-26-2012 02:13 PM
I don't understand. You said "I'm passing the VISA resource to my VIs after the connection is already open". The resource is the same whether you are doing a write or a read. You have the same com port resource don't you?
03-26-2012 02:50 PM
Ok, let's start over. I have two computers that communicate over a serial port. Both computers open their serial ports and use my VIs to communicate. Those VIs take in a VESA Resource to pass to the underlying VESA Read/Write functions.
Now, I want to do the same thing but over TCP/IP not the serial port. On one computer, acting as the client, I can pass the string "tcpip::address::port::SOCKET" to VISA Open to connect to the other but there doesn't appear to be a way on the server to listen for that incoming connection.
Normally, you would use TCP Listen and pass the TCP Connection ID it returns to the TCP Read/Write functions to communicate, but my VIs on the server take a VESA Resource. And, while you CAN go from a VISA Resource to a TCP Connection, it doesn't look like you can do the reverse.
I was wondering if there was a way, maybe a way to format the VISA resource string, to listen for an incoming connection; the opposite of passing in "tcpip::address::port::SOCKET" to VISA Open.
03-26-2012 03:05 PM
Okay, so different pc's. So one pc has an IP of say 192.168.1.1 (pc1) and the other (pc2) has an IP of 192.168.1.2. So you are saying you can open on pc1 a resource to 192.168.1.2 and write to it but on pc2 you cannot open a resource to 192.168.1.1 and read from it?
03-26-2012 03:10 PM
Yes, on PC1 there is a way to format the VISA Resource name to connect to a server (PC2) but no way to format the VISA Resource name on PC2 to listen for that connection.
03-26-2012 05:21 PM
And what kind of error do you get with the VISA Open on pc2?