10-26-2008 05:29 PM
10-26-2008 06:31 PM
10-27-2008 10:50 AM
Tomm10,
It is not entirely clear from your post what kind of a TCPIP resource you want to simulate at the other end. For the purpose of this discussion, let's call the computer at the other end the Simulator machine.
Now, if you are trying to support a raw socket resource on the simulator machine, i.e. you want to be able to create a session to 'TCPIP0::<simulator-machine-ip>::<port>::SOCKET', all you need on the server machine is a program that is listening on a socket at that port. When the client tries to open a session to the above mentioned resource, NI-VISA will try to open a TCP connection to that port on the simulator machine, and if nobody is listening on the port, the open fails. Once the session is established, you can use NI-VISA to write to and read from that resource, which ultimately means that you are sending data to and receiving data from that port on the simulator machine. It is for you to decide what exact data to write and how to respond to that from the simulator machine.
If you are trying to support a VXI-11 resource on the simulator machine, then the task becomes a lot more complicated. The details of what kind of a program should run on the simulator machine can be found in the VXI-11 spec found at: http://www.vxibus.org/?q=node/206 where you can download the spec from the link at the bottom (where it says VXI 11 revision).
Also, note that it is not necessary to add the TCPIP resources to MAX to be able to access them with NI-VISA. If you add them to MAX, those resources will be available when you do a viFindRsrc. If not, you can still pass the address manuallly to viOpen, and be able to open a session, provided there is someone listening at the other end.
Pankaj
10-28-2008 01:47 PM - edited 10-28-2008 01:57 PM
Dear Dennis,
>>An open port on another pc is not pretending to be an instrument.
Pretty obvious, believe me my knowledge is at higher level than you expect.
>>A VXI-11 compliant instrument requires much more.
That is why I have 10 months to complete my project.
>>I don't know how I can be any clearer.
Neither me. You seem to not understand me.
>>You will not establish any connection until you can make the discovery process emulate a real instrument.
IMHO false. I should be able to establish TCP/IP connection before sending VXI messages.
>>You have to do some actual simulation.
As above.
Please do not take me wrong, I rely appreciate the fact you are trying to help, but apparently pankaj understands me better.
---
Dear pankaj,
>>and if nobody is listening on the port, the open fails
I use TCPIP Listen (LabView) on second PC.
>>note that it is not necessary to add the TCPIP resources to MAX to be able to access them with NI-VISA
I was using MAX just to check if it opens TCP/IP connection (as an alternative way), but it didn't even try.
I am stuck:(
tomm10
10-28-2008 02:38 PM
pankaj said exactly the same thing I did about reading the VXI-11 spec and that it would be a very complicated thing
From your code, it would appear you are not trying to emulate a VXI-11 instrument anyway because your resource string is for a Raw Socket type of instrument. That is something entirely different. It would have been nice if you had mentioned that your goal is really not VXI-11.
10-28-2008 02:39 PM
Tomm10,
Then you will need to use Wireshark (www.wireshark.org) to see what is happening during the TCP connection setup. I successfully ran your vi's on my machine (the instrument.vi should start first and then the pc.vi). Infact, I added a VISA write to your pc.vi and wrote 'HELLO' to the connection, and on your instrument VI, I took the connection returned by the TCP Listen and fed it to a TCP read and successfully read 5 bytes to read HELLO. Did you mean this didn't work on your machine? If not, most likely there is an issue with a firewall or something. Let me know what WireShark says and I can help you further. Again, keep in mind that a SOCKET type resource is little more than a thin wrapper on top of simple TCP communication.
For VXI-11, you will need to write a VXI-11 server that will run on the simulator PC and register its port with the Port Mapper. VISA sends a broadcast on the subnet to ask the portmappers on all machines whether a VXI-11 server program is running on their machine and if they return a valid port, establish a connection on that port. The communication then follows a specific protocol as mandated in the spec I mentioned earlier.
Pankaj
11-01-2008 09:53 AM
Hi,
At my computer it does not work. My firewall, Wireshark, AATools neither tcpview show no activity. I think that something might be not installed, but have no idea what. I am using LabVIEW 8.0, without uninstalling it I installed version 8.6 evaluation. Still no effects. I will try to reinstall whole system.
Thank you for your help.
tomm10
08-24-2009 02:02 PM - edited 08-24-2009 02:04 PM
After a while, when my project is finished:), I can answer my question myself:P.
The problem was with drivers! I had no clue that I had to add VISA drivers manualy as I assumed it was installed automaticaly with LabVIEW. Yes, it can be done during installation but it still need to be done deliberately by person installing the software and requires the Driver CD.
With the newest version (2009) this problem is solved by giving you more detailed error message.
Thanks to everyone again.
tomm10
11-17-2011 10:23 AM
I am having a similar probelm (same error message).
This LV app works on older verion of RedHat. I am now trying to run it (using 7.1) on RedHat 6.
I am talking to a Terminal Server which is connected with an RS232 line to a device that uses TCP/IP.
I need to be able to run the 7.1 version as a backup until the 2009 version of the app is running properly.
This is a raw TCP/IP connection.
this doesn't work with the 2009 RTE/VISA 5.1.1 either!