
47
Program Samples
Programing Samples
C#.NET & Visual Studio 2010
The samples provided are written in C# for Visual Studio 2010 (.NET version 4.5),
1.
Transfer Screen Images
2.
Serial Poll for Sweep Complete
These samples use the VISA driver.
Transfer Screen Images
Serial Poll for Sweep Complete
Function
Capture and transfer Screen Images from the instrument
Description
This example demonstrates how to:
1. Store the current screen image as a PNG file on the instrument’s
D:
drive, with a
user-specified name
2. Retrieve the screen image data from the instrument as a Program Data Block
3. Analyze the header of the Program Data Block and extract the PNG bitmap from the
block
4. Store the extracted bitmap as a PNG file in the computer’s current directory, with the
same user-specified name
5. Delete the PNG file that was stored on the instrument’s
D:
drive
Language
C#
Project
Folder
vs2010.net/x_screencapture
Function
Serial Poll for Sweep Complete
Description
This example demonstrates how to:
1. Modify the timeout value
2. Initiate a sweep
3. Poll the instrument to determine when the operation is complete
4. Query and report the sweep result
Language
C#
Project
Folder
vs2010.net/x_sweep