Programming Guide
55
status = viOpen (defaultRM, head, VI_LOAD_CONFIG, VI_NULL, &instr);
if (status<VI_SUCCESS)
{
printf ("An error occurred opening the session\n");
viClose(defaultRM);
}
status = viPrintf(instr, "*idn?\n");
status = viScanf(instr, "%t", outputBuffer);
if (status<VI_SUCCESS)
{
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);
system(
"pause"
);
return 0;
}
Run result.
4.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.
Summary of Contents for SDG5000 series
Page 38: ...SDG5000 User Manual 27 Figure 2 5 Setting the Offset ...
Page 109: ...SDG5000 User Manual 98 Figure 3 1 Sine Waveform ...
Page 111: ...SDG5000 User Manual 100 Figure 3 2 Square Waveform ...
Page 129: ...SDG5000 User Manual 118 3 12 Figure 3 12 FSK Waveform ...
Page 135: ...SDG5000 User Manual 124 Figure 3 15 DSB AM Waveform ...