VisualBasic.NET Sample programs (GP-IB) |
The following programs are provided without charge, for use entirely at your own risk.
HIOKI disclaims any and all responsibility for any consequences arising out of use of this software.
The following sample programs use a GP-IB controller from RATOC Systems.
Please bear in mind that the API for GP-IB depends on the manufacturer of the GP-IB controller.
Visual Basic and Visual Studio are registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and other countries.
Microsoft, Windows and MS-DOS are registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and other countries.
Enter a command and press the Send button to send it to the instrument.
Responses to queries are displayed in the text box.
Sample program
This program causes the instrument to take 101 measurements on channel CH1-1, and reads the measured values.
The number of data objects stored in instrument memory is first obtained by the "MEMORY:MAXPOINT?" query.
When this query returns 0, the program is ready to receive measurement data.
Pressing the Execute button then causes the instrument to start measuring and sending the measured values.
Sample program
This program writes a sine wave on channel CH1-1.
Pressing the Execute button sends the sinusoidal data to the instrument after ensuring that the memory is ready to receive it.
Sample program
This program displays current measurement data in a text box.
Pressing the Execute button displays the data once per second.
Pressing the Stop button stops measurement.
Sample program
This program saves data from instrument memory into a file on the PC, then reads the file and sends it back to the instrument.
Pressing the Execute button saves the data from channel CH1-1 into a file named "C:\sample.dat".
Pressing the Open button then causes the PC to read the data stored in this file and send it back to the instrument.
Sample program
This program employs the ":STATUS" command to check instrument status.
Pressing the Execute button starts instrument status checking.
Pressing the Stop button stops status checking.
Sample program
This program issues a service request when a trigger is applied.
Pressing Execute enables a trigger-related register and starts a measurement.
A dialog appears if the trigger is not applied.
Sample program