Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP Communication

Hi Specialists,

maybe I didn't understand the IVI-Concept, but I hope to get help here.

With the LabWindows/CVI 8 wizard I made an IVI-Driver for general purpose for our instrument. This instrument has a GPIB and an Ethernet port.

First I did a GPIB driver an everything went well with "GPIB0::18::INSTR". But it is necessary to communicate also over Ethernet. The instrument is well connected and communication is possible (ping 10.0.0.2 gives answer and the also our standard software works).

Now the wizard doesn’t show TCP/IP as an option to generate a new driver. Only GPIB, Serial and VXI. OK, I found the following option for the initialization in the help for CVI “TCPIP::10.0.0.2::INSTR”, but it doesn’t work. I become the error from the function viOpen which returns -1073807239 “The protocol specified is invalid”.

In the help of the initialization-panel (wich was generated from the wizard) the “TCPIP::”-option isn’t descripted (only GPIB, AXI and ASRL are shown), but in the help for CVI I found it under “VISA Resource Syntax and Examples“ with many others.

What about the VISA which should allow TCP/IP? Is it automatically includet in the driver made by the wizard? How can I communicate with the instrument over Ethernet?

Please help!

0 Kudos
Message 1 of 4
(4,197 Views)
I have just tried CVI's Driver Wizard and also confirmed that TCP/IP is not there.  I don't know the reason.  However, because the wizard generated codes uses VISA functions for instrument IOs, you can easily switch to TCP/IP without modifying or with minimal modification for generated source codes. 
 
You tried "TCPIP::10.0.0.2::INSTR" but it requires that your instrument is VXI-11 based protocol, and it must be already scanned by NI-MAX.  If the instrument is not VXI-11 based, the other try is use raw SOCKET protocol such as specifying TCPIP::10.0.0.2::<n>::SOCKET, where the <n> part must be the correct port# the instrument is supporting, such as 8080 any other.
Message 2 of 4
(4,170 Views)
Thank-you, that’s it!

The instrument uses UDP to communicate over LAN. With the Software NI-MAX I could ensure, that it is not a VXI-11 device.
So, what would now be the best way to develop an IVI specific instrument driver which could handle UDP?

0 Kudos
Message 3 of 4
(4,154 Views)
You have an instrument that uses UDP instead of TCP/IP? I'm not sure I would want one of those but in any case, you can write a instrument specific driver that uses any protocol that you want. I'm just not sure it would be IVI. I may be wrong but I don't think there exists a mechanism to detect and map a UDP instrument in MAX so that you could use a class driver. All of the IVI drivers I've used (and the few I've written) are based on VISA and VISA doesn't support UDP - only VXI-11 and TCP/IP Socket as Makato pointed out.
Message 4 of 4
(4,141 Views)