1-4 Sending SCPI Commands Chapter 1 — General Information
1-12 PN: 10580-00322 Rev. F S331L PM
4. Select the Input/Output Basic I/O tab and execute the default *IDN? Query. If the PC is
connected to the instrument the command returns the following information from the
Buffer: manufacturer name (“Anritsu”), model number/options, serial number, and
firmware package number, as shown in the example below.
Figure 1-11. NI VISA Interactive Control USB Basic I/O Tab
Note
When sending SCPI commands over Ethernet, it is required to send a newline
termination character at the end of each command. In the example above, a
newline character ("\n" in this case, but could be different depending on your
programming environment) was used to terminate the *IDN? command.
Note
When sending query commands over raw socket, the entire buffer must be read
before the next query command is sent. Each query result is terminated by a
newline to help identify the end of the query response. Query read operations
could be broken into multiple reads, if necessary.
Note
When using raw socket connections, you must close a session before opening a
new one or before switching to a new protocol (such as USB). If you try to open a
new session or switch protocols without first closing the previously opened
session, you may lose communications with the instrument and not be able to
reconnect until you reboot the instrument.