Page 2
(1) year from the date of shipment as identified by the Customer’s and is subject to change packing slip or carrier waybill. ThinkRF reserves the right to void the warranty on any without notice. ThinkRF equipment that has been altered or damaged due to Customer negligence,...
Institute of Electrical and Electronics Engineers Intermediate Frequency Local Area Network Most Significant Byte Phase-Locked Loop Radio Frequency Receiver Front-End Downconverter 30 GHz Downconverter SCPI Standard Commands for Programmable Instruments TCP/IP Transmission Control Protocol/Internet Protocol ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Abbreviations List of Figures Figure 1: D2030 Interconnect Diagram with A Spectrum Analyzer ............9 Figure 2: SCPI Language Hierarchical or Tree Structure Example ............12 Figure 3: SCPI Downconverter Instrument Model ..................13 Figure 4: Status Reporting Structure with Status & Enable Registers ............21 Figure 5: SDS Register Model .........................
Audience This document is written for software developers wishing to develop and/or maintain a software interface to the D2030 and who have a basic understanding, familiarity and experience with network test and measurement equipment. Conventions This section describes the conventions used in this document.
9 AM to 5 PM Eastern Time, Monday to Friday. Contact us at support@thinkrf.com or by calling +1.613.369.5104. Before contacting Support, please have the following information available: • D2030's serial number which is located on the identification label on the D2030's underside. • The product version. •...
(unless specified though unlikely). System Overview D2030 30 GHz Downconverter is used to convert RF signals in the range of 27-30 GHz down to an intermediate frequency (IF) of 3.55 GHz or 5.6 GHz (determined by the product Option code, see :SYSTem:OPTions?).
(page onward) for further details on the commands. Caution pertaining to multi-user: The current firmware version of the D2030 allows multiple applications to connect to the unit simultaneously but it does not support independent sessions. Therefore, the actions of one user may over-write those of another.
[:SENSe] Page :DCONverter :MANual :LO<1|2> :FREQuency[?] Queries or manually sets the LO frequencies (LO1, LO2) :FREQuency :CENTer[?] Sets the center frequency of the D2030 RF input :REFerence :PLL[?] Selects the 10 MHz reference clock source :OUTPut Page :DCONverter :MANual :ATTenuation[?]...
The D2030 does not fit this traditional model in that it performs no intermediary digital processing. However, it performs tasks such as frequency conversion purely in the analog domain.
Query the standard Event Status Register (ESR), which returns the decimal sum of the bits in the ESR. The ESR will only appear set if and only if its event has occurred and the corresponding bit in the ESE is also enabled. ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
*OPC (Operation Complete) sets bit 0 in the ESR to 1 when all commands received before *OPC or *OPC? have been completed. When the D2030 is connected using a HiSLIP session, this command can be used to raise a Service Request by configuring the ESE and SRE registers appropriately.
When a bit is set in the SRE register and the corresponding STB register bit is also set, a Service Request is raised if the D2030 is connected using a HiSLIP session. It has no effect when connected via Telnet.
This command will save the changes to the LAN settings to the unit’s internal memory. The new settings will take effect only after the D2030 has been rebooted or power cycle. Once the LAN settings are saved, they are not affected by :STATus:PRESET *RST.
The CURRENT query will return what is currently and actually used by the Downconverter's LAN interface. Note: The default factory reset STATIC IP is 192.168.1.2. Syntax SYSTem:COMMunicate:LAN:IP <IPv4 address> SYSTem:COMMunicate:LAN:IP? [CURRENT] Parameter Set: D.D.D.D where D = 0 – 255 ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
:SYSTem:ERRor[:NEXT]? command, it would be unclear which command has resulted in which error. Syntax :SYSTem:ERRor[:NEXT]? Parameter None Response <error code>,<description> Output Data Type <integer>,<string> ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
5.6 GHz Final IF :OUTPut:IF:FREQuency? :SYSTem:VERSion? This query returns the SCPI version number that the instrument software complies with. Syntax :SYSTem:VERSion? Parameter None Response <NR2> Output Data Type String (decimal number YYYY.V) Example :SYST:VERS? ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
If the summary of the queue is reported, it shall be reported in bit 2 of the status byte register. A subset of error/event numbers is defined by SCPI. ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
An SDS is defined as either a Register Model or a Queue Model. The Queue Model applies to the Error/Event Queue. The summary bit is set to 1 whenever the queue is not empty, indicating that the device has messages to retrieve from the queue. ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
These conditions can be used for synchronizing between a controller and the D2030. Usage of bits 0-7 and 13-14 are explicitly defined in the SCPI specification and any appropriate conditions in the D2030 are mapped into these bits. Bits 8-12 are vendor-defined.
(*STB?) and then querying the underlying SDS for each summary bit that is set using the appropriate command. Note: The SRQ mechanism is not available when connecting to the D2030 via SCPI Telnet. Polling can be used instead to determine the source of the service request.
When a bit is set in the OPTR, a low-to-high transition in the OCR bit will set the corresponding OSR bit. See Figure 4. Syntax :STATus:OPERation:PTRansition <integer> Parameter/Response <integer> Allowable Values 0 – 32767 (2 *RST State ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
SCPI Command Set Examples :STAT:OPER:PTR 256 :STATus:PRESET This command presets the D2030 (similar to *RST), and OSE and QSE to zero. Syntax :STATus:PRESET Parameter/Response None :STATus:QUEStionable[:EVENt]? This command queries the standard Questionable Status Register (QSR) for any event. The query returns the decimal sum of the bits set in the QSR. The decimal sum is the binary equivalent of the 16-bit mask.
When a bit is set in the QPTR, a low-to-high transition in the QCR bit will set the corresponding QSR bit. See Figure 4. Syntax :STATus:QUEStionable:PTRansition <integer> Parameter/Response <integer> Allowable Values 0 – 32767 (2 *RST State Examples :STAT:QUES:PTR 256 ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
This command queries the Downconverter's internal temperature provided by one or more temperature sensors. The response field varies depending on how many sensors are available in the D2030. If multiple temperature sensors are available, a set of comma separated values is returned.
Caution: This command is for test purposes only. Adjusting the LO frequencies overrides the settings obtained from the internal frequency plan. The resulting IF output may be out of specification until the D2030 is retuned using the [:SENSe]:FREQuency:CENTer command. Syntax [:SENSe]:DCONverter:MANual:LO<1|2>:FREQuency <NRf [unit]>...
I/O Data Type <character> *RST State Examples :SENSE:REF:PLL INT :SENS:REF:PLL? OUTPut Commands :OUTPut:DCONverter:MANual:ATTenuation This command sets or queries the attenuation setting of the D2030's IF output. Syntax :OUTPut:DCONverter:MANual:ATTenuation <NRf [unit]> :OUTPut:DCONverter:MANual:ATTenuation? Parameter/Response <dB attenuation> Input Data Type NRf [unit] Allowable Values 0-31.25 in 0.25 dB steps...
Integer Default I/O Unit *RST State Depending on the tuning center frequency Examples :OUTP:DCON:MAN:ATT 31 :OUTP:DCON:MAN:ATT? :OUTPut:FILTer:BPASs:BANDwidth? This command queries the D2030's IF output filter bandpass nominal bandwidth. Syntax :OUTPut:FILTer:BPASs:BANDwidth? Parameters None Query Response <integer> Default Output Unit *RST State...
TCP/IP connection and sending some SCPI commands in a Windows system. Connecting to D2030 ThinkRF's Downconverters are network ready devices conveying control commands and data using the TCP/IP protocol. Network application access is via SCPI Raw, SCPI Telnet, or HiSLIP.
Appendix A: Booting up and Connecting to the D2030 SCPI D2030 Remote Host SCPI <IP>:5025 <IP>:5025 SCPI D2030 <IP>:5025 SCPI Telnet SCPI Telnet is similar to SCPI Raw but it is meant to be used as an interactive user interface as it echoes typed characters back to the user. A standard Telnet client may be used to communicate with the D2030 directly.
A major limitation of using SCPI Raw and SCPI Telnet is the inability of instruments like the D2030 to signal the test controller when it needs attention. The controller is required to poll instruments individually, resulting in potentially slow and inefficient control.
Page 34
Appendix A: Booting up and Connecting to the D2030 /***************************************************************************** * A demo of TCP/IP client socket connection to a Downconverter (DCN) at port * 5025, with sending and receiving some example SCPI commands. * NOTES: * - This example is for Windows socket only.
Page 35
- 1] = '\0'; printf("%s query returns %s\n\n", scpi_cmd[i+1], scpi_rsp); closesocket(sock_fd); return 0; * Get sockaddr of IPv4 or IPv6 sock_addr - a socket address structure * Return: The socket address void *get_in_addr(struct sockaddr *sock_addr) ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Page 36
Appendix A: Booting up and Connecting to the D2030 if (sock_addr->sa_family == AF_INET) return &(((struct sockaddr_in*) sock_addr)->sin_addr); return &(((struct sockaddr_in6*) sock_addr)->sin6_addr); * similar to inet_ntop so that old windows version could use it const char *_inet_ntop(int af, const void *src, char *dst, socklen_t cnt) if (af == AF_INET) { struct sockaddr_in in;...
Page 37
* Return: Number of bytes sent on success, or negative otherwise. int socket_send(int sock_fd, char const *out_str, int len) int total_txed = 0; int bytes_txed; int bytes_left = len; char cmd_str[MAX_SCPI_LEN]; // Add end of line character, required for SCPI command ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Page 38
Appendix A: Booting up and Connecting to the D2030 cmd_str[0] = '\0'; strcat(cmd_str, out_str); strcat(cmd_str, "\n"); // Loop to send all the bytes while (total_txed < len) { bytes_txed = send(sock_fd, cmd_str + total_txed, bytes_left, 0); // Check the returned value if (bytes_txed >...
Page 39
"Connection is already closed.\n"); return -1; } else if (ret_val < 0) { fprintf(stderr, "recv() function returned with error %d (\"%s\")", errno, strerror(errno)); return -1; //fprintf(stderr, "Received (%d bytes)\n", ret_val); *bytes_received = ret_val; return 0; ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
“;”, a new line-feed or carriage return is required. Example in C: “:FREQ:CENTER 27 GHZ\n” or “FREQ:CENT 27 GHZ;INP:GAIN 1\n”. - Maximum number of characters allow for a SCPI command string (single or multiple commands) is 512. ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
<NRr> Non-decimal numeric value such as hexadecimal, octal or binary <char> Character program data <character> Ex: MAXimum or MINium <string> ASCII string surrounded by single or double quotes Ex: “This is an example” ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Note the following examples, which are all equivalent. :FREQ:CENTer 27.55 GHz Example :FREQ:CENTer 27550000000 is equivalent to :FREQ:CENTer 27550000000 Hz is equivalent to :FREQ:CENTer 27550 MHZ is equivalent to :FREQ:CENTer 27.55e9 is equivalent to ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Description Operation Complete Set to indicate that all pending operations are complete and (OPC) the D2030 is ready to accept another command, or that query results are available. Request Control (RQC) This bit is not used and is always 0.
This bit is reserved for the CALIbrating event. SETTling Set to indicate that the D2030 is in the process of tuning and that the IF output signal is not yet valid. not used This bit is reserved for the RANGing event.
The unread results of a previous command are cleared from the queue when a new command or query is received. Error and Event Queue The D2030 has an Error and Event FIFO Queue that holds up to 16 errors and events. It is queried using the :SYSTem:ERRor[:NEXT]? command.
Read trace command issued while there is no data available. -911 Need firmware upgrade The current firmware needs upgrading. -912 Invalid option license The option could not be installed because of invalid license. ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Appendix E: SCPI Commands Quick Reference Appendix E: SCPI Commands Quick Reference This section summarizes the SCPI commands available for interfacing with D2030. The commands are listed alphabetically based on the main node, then sub-nodes, so on. The sub-nodes are grouped and listed alphabetically based on functionality.
Page 48
Query the LO2 frequency :MIX2 ON | OFF Enable or disable the second stage mixer v1.0 :FREQuency :CENTer Set the center frequency of the D2030 v1.0 :CENTer? [MAX | MIN] Query the center frequency of the D2030 v1.0 :REFerence Select the 10 MHz reference clock source...
Page 49
Return the SCPI error/event queue v1.0 :OPTions? Returns comma separated 3-digit values to v1.0 represent the hardware option(s) or features available with a particular Downconverter model :VERSion? Return the SCPI compliance version v1.0 ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
1999, version 1999.0, http://www.spiconsortium.org 2. "IVI-6.1: IVI High-Speed LAN Instrument Protocol", IVI Foundation, 24 February 2011, Version 1.1, http://www.ivifoundation.org 3. "IEEE Standard Codes, Formats, Protocols, and Common Commands", ANSI/IEEE Standard 488.2-1992, http://ieeexplore.ieee.org/xpl/freeabs_all.jsp? tp=&isnumber=5581&arnumber=213762&punumber=2839 ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Mar. 01, 2018 Update Figure 1 Document Version is not the same as the firmware Release Version as mentioned in Appendix E: SCPI Commands Quick Reference. ThinkRF D2030 30 GHz Downconverter Programmer's Guide...
Need help?
Do you have a question about the D2030 and is the answer not in the manual?
Questions and answers