Technical data

Programming Fundamentals 28
Agilent N8201A Performance Downconverter Synthetic Instrument Module, 250 kHz to 26.5 GHz 601
Options and Parameters telnet operates in line-by-line mode or in
character-at-a-time mode. In line-by-line mode, typed text is first echoed on the screen.
When the line is completed by pressing Enter, the text line is then sent to host. In
character-at-a-time mode, text is echoed to the screen and sent to host as it is typed.
In some cases, if your telnet connection is in “line-by-line” mode, there is no local echo.
This means you will not be able to see the characters you are typing on your computer's
display until after you press Enter.
To remedy this, you need to change your telnet connection to “character-by-character”
mode. This can be accomplished in most systems by escaping out of telnet to the telnet>
prompt and then typing mode char. Consult your telnet program's documentation for how
to change to “character-by-character” mode.
Socket LAN Clear Device Example:
This example puts the N8201A into Device Clear Active state. The first parameter is the
hostname of the N8201A. The second parameter is the port number assigned to the control
channel for the raw SCPI channel. This number is obtained with the
SYST:COMM:LAN:SCPI:SOCK:CONT? command.
using System;
using System.Text;
using System.Threading;
using System.Collections;
using System.Net.Sockets;
namespace ConsoleApplication1
{
/// <summary>
/// This program demonstrates sending a device clear to the N8201A over raw sockets
/// </summary>
class Class1
{
// This method puts the N8201A into Device Clear Active State. The first parameter is the
// hostname of the N8201A. The second parameter is the port number assigned to the
control
// channel for the raw SCPI channel. This number is obtained with the
// SYST:COMM:LAN:SCPI:SOCK:CONT? command.