![Quonset Microwave QM1004A-2-18 User Manual Download Page 38](http://html1.mh-extra.com/html/quonset-microwave/qm1004a-2-18/qm1004a-2-18_user-manual_3775615038.webp)
QM1004A-2-18 Combined RF Upconverter/Downconverter
User Manual
2.2 TCPIP
2.2.1 VISA Descriptors
To communicate with the Quonset Microwave QM1004A-2-18 Combined RF Upconverter/Downconverter
as a TCP/IP device, use the following TCPIP VISA descriptor format:
TCPIP::IP address::port number::SOCKET
Descriptor Example
TCPIP::192.168.2.188::5025::SOCKET
2.2.2 VISA Attributes
When using the TCPIP SOCKET connection, the following two VISA Attributes must be set for communi-
cation to work properly:
VI_ATTR_TERMCHAR
VI_ATTR_TERMCHAR_EN
The QM1004A-2-18 Combined RF Upconverter/Downconverter uses a newline character (’\n’) to indi-
cate end of transmission on query replies and setting these two attributes configures the communicating
system to interact properly with the device.
2.2.3 TCPIP VISA Code Example
ViSession rscmng;
ViSession qm1004a;
char buf[256] = 0;
viOpenDefaultRM(&rscmng);
viOpen(rscmng,(ViRsrc)"TCPIP::192.168.2.188::5025::SOCKET",VI_NULL,VI_NULL,&qm1004a);
viSetAttribute(qm1004a,VI_ATTR_TERMCHAR,’\n’);
viSetAttribute(qm1004a,VI_ATTR_TERMCHAR_EN,VI_TRUE);
viPrintf(qm1004a,(ViString)"*IDN?\n");
viScanf(qm1004a,(ViString)"%t",&buf);
viClose((ViObject)qm1004a);
viClose((ViObject)rscmng);
Quonset Microwave
Revision 1.4.3
26