Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Service request over TCP/IP

I would like to get a service request from the instrument over TCP/IP connection. Instrument (R&S DVQ) supports following modes for TCP/IP connection: IEEE 1174.0, 1174.1 and 1174.2. Only way I have succeeded to get connection through MAX is using the TCPIP::ip_number::3000::SOCKET VISA configuration and using the mode IEEE 1174.0 in instrument.

The problem is that I cannot use the viReadSTB command if the protocol for the VISA attribute VI_ATTR_IO_PROT is set to default VI_PROT_NORMAL. I get an error status VI_ERROR_INV_SETUP. If I change the VISA attribute VI_ATTR_IO_PROT after I opened the communication to VI_PROT_4882_STRS in MAX, I get an error status VI_ERROR_IO or VI_ERROR_CONN_LOST.

Does the IEEE1174.2 and attribute value VI_PROT_4882_STRS mean same communication protocol ?
Which mode I should use in instrument ?
How can I configure VISA attributes to avoid the error status VI_ERROR_INV_SETUP ?

Regards,
Petri
0 Kudos
Message 1 of 4
(14,755 Views)
Hello Petri,

The instrument you are using obviously does not support the LAN instrument protocol and therefore you use the platform independent socket API VISA provides.

I believe you have read the VISA manual where it says that by default, only the read and write operations are valid. If the device recognizes 488.2 commands such as "*TRG\n" and "*STB?\n", you can set the attribute VI_ATTR_IO_PROT to VI_PROT_4882_STRS (4) and then use the operations such as viAssertTrigger() and viReadSTB(). However, unlike LAN instruments, there is no way to support the service request event with the SOCKET resource class.

Regards,
Jimmie A.
Applications Engineer, National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 2 of 4
(14,730 Views)

@Petri wrote:
Instrument (R&S DVQ) supports following modes for TCP/IP connection: IEEE 1174.0, 1174.1 and 1174.2.



I am confused. IEEE 1174 describes how to do GPIB-style communication across an RS-232 serial port. It has nothing to do with TCP/IP. You may want to look at your instrument to see if it offers something like VXI-11, which is a protocol to do GPIB-style communication across TCP/IP.
0 Kudos
Message 3 of 4
(14,717 Views)
Hello,
Thanks for the replies! The instrument supports two hardware interfaces; rs232 and tcp/ip. In setup menu of the instrument it is possible to choose the mentioned IEEE modes separately for both interfaces.

According to manual, the IEEE mode for tcp/ip interface means: "selects an IEEE standard for the network link."

Manual even describes the method how the service request over tcp/ip should work. But, the service request is not supported in mode IEEE 1174.0. I experienced communication problems using IEEE 1174.2 mode and VI_PROT_4882_STRS value in VI_ATTR_IO_PROT attribute (which is required by NI VISA for the viReadSTB command.) Therefore, the question remains if the IEEE1174.2 mode is compatible with VISA IO protocol VI_PROT_4882_STRS.

/Petri
0 Kudos
Message 4 of 4
(14,711 Views)