EasyManuals Logo

Keysight Technologies InfiniiVision DSOX1204G User Manual

Keysight Technologies InfiniiVision DSOX1204G
946 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #895 background imageLoading...
Page #895 background image
Programming Examples 36
Keysight InfiniiVision DSOX1204A/G Oscilloscopes Programmer's Guide 895
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Change this variable to the address of your instrument
string VISA_ADDRESS = "USB0::0x2A8D::0x1797::CN56240004::0::INSTR"
;
// Create a connection (session) to the instrument
IMessageBasedSession session;
try
{
session = GlobalResourceManager.Open(VISA_ADDRESS) as
IMessageBasedSession;
}
catch (NativeVisaException visaException)
{
Console.WriteLine("Couldn't connect.");
Console.WriteLine("Error is:\r\n{0}\r\n", visaException);
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
return;
}
// Create a formatted I/O object which will help us format the
// data we want to send/receive to/from the instrument
MessageBasedFormattedIO myScope =
new MessageBasedFormattedIO(session);
// For Serial and TCP/IP socket connections enable the read
// Termination Character, or read's will timeout
if (session.ResourceName.Contains("ASRL") ||
session.ResourceName.Contains("SOCKET"))
session.TerminationCharacterEnabled = true;
session.TimeoutMilliseconds = 20000;
// Initialize - start from a known state.
// ==============================================================
string strResults;
FileStream fStream;
// Get and display the device's *IDN? string.
myScope.WriteLine("*IDN?");
strResults = myScope.ReadLine();
Console.WriteLine("*IDN? result is: {0}", strResults);
// Clear status and load the default setup.
myScope.WriteLine("*CLS");
myScope.WriteLine("*RST");
// Capture data.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies InfiniiVision DSOX1204G and is the answer not in the manual?

Keysight Technologies InfiniiVision DSOX1204G Specifications

General IconGeneral
BrandKeysight Technologies
ModelInfiniiVision DSOX1204G
CategoryTest Equipment
LanguageEnglish

Related product manuals