51 User Manual
EAR99 technology subject to restrictions on copyrights page.
Visual Basic programming examples
Environment:
Windows 7 32-bit systerm , Microsoft Visual Basic 6.0
Example Content:
Using NI-VISA, access control devices via USBTMC and
TCP/IP, send commands to read the return value.
Follow the steps to complete the example:
1. Open Visual Basic, create a standard application project (Standard EXE).
2. Using the NI-VISA library to set up the project environment, click on the
project's existing tab >> add module. Search for the include folder file
under the NI-VISA installation path in visa32.bas and add the file.
This allows VISA functions and VISA data types to be used in the program
3. Add code
•
Based on USB interface code:
Write Usbtmc_test function.
function USBTMC_test()
This code demonstrates using NI-VISA to send synchronous read and write
commands to a USB Test & Measurement Class