EasyManuals Logo
Home>UNI-T>Portable Generator>UTG900E Series

UNI-T UTG900E Series Programming Manual

UNI-T UTG900E Series
41 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #28 background imageLoading...
Page #28 background image
Programming Manual UTG900E Series
Instruments.uni-trend.com
28 / 41
{
char outputBuffer[VI_FIND_BUFLEN];
ViSession defaultRM, instr;
ViStatus status;
/* First we will need to open the default resource manager. */
status = viOpenDefaultRM(&defaultRM);
if (status < VI_SUCCESS)
{
printf("Could not open a session to the VISA Resource Manager!\n");
}
/* Now we will open a session via TCP/IP device */
char head[256] = "TCPIP0::";
char tail[] = "::inst0::INSTR";
strcat(head, pIP);
strcat(head, tail);
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("\nMesseage read from device: %*s\n", 0, outputBuffer);
}
status = viClose(instr);
status = viClose(defaultRM);
printf("Press Enter to exit.");
fflush(stdin);
getchar();
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
printf("Please input IP address:");
char ip[256];
fflush(stdin);
gets(ip);
tcp_ip_test(ip);
return 0;

Table of Contents

Other manuals for UNI-T UTG900E Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the UNI-T UTG900E Series and is the answer not in the manual?

UNI-T UTG900E Series Specifications

General IconGeneral
BrandUNI-T
ModelUTG900E Series
CategoryPortable Generator
LanguageEnglish

Related product manuals