Programming Guide
SIGLENT
SDL1000X Programming Guide 64
{
printf("viRead failed with error code: %x \n",status);
viClose(defaultRM);
}else
printf ("\ndata read from device: %*s\n", 0,outputBuffer);
status = viClose (instr);
status = viClose (defaultRM);
return 0;
}
4.1.2 Example of VB
Environment: Win7 32bit system, Microsoft Visual Basic 6.0
The function of this example: Use the NI-VISA, to control the device with
USBTMC and TCP/IP access to do a write and read.
Follow the steps to complete the example:
1、 Open Visual Basic, build a standard application program project (Standard
EXE)
2、 Set the project environment to use the NI-VISA lib, Click the Existing tab of
Project>>Add Existing Item. Search for the visa32.bas file in the include folder
under the NI-VISA installation path and add the file.
This allows the VISA functions and VISA data types to be used in a program.
3、 Add codes: