VisualBasic 2005 Sample programs (TCP/IP) |
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.
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.
• In order to connect to an existing network, settings may need to be allocated by the network system administrator (IS department) beforehand.
• Refer to the Networking Setup Procedure about setting the IP address of the instrument.
• For example, if the subnet mask of the PC is "255.255.255.0", set the subnet mask of the instrument to the same value.
Then by making only the rightmost octet (value to the right of the last period) of the instrument's IP address different from that of the PC,
they will be able to connect to each other.
• The settings in this section serve only as examples. Making improper TCP/IP settings can interfere with network communications.
Instrument Setting Example
PC Setting Example
This program establishes a connection with the instrument and starts communication.
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 1
This program causes the instrument to take 101 measurements on channel CH1, 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 2
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 3
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 4
Java Sample program (TCP/IP) |
This program controls Measuring and Stopping .
Pressing the Measure button starts measuring
Pressing the Stop button stops measuring .
The address of the device connected will be displayed in the text box when connected to the main instrument.
Sample program Java 1