#include "stdafx.h"
#include <stdio.h>
#include "stdafx.h"
#include "visatype.h"
#include "visa.h"
#include "Functions.h"
#include "windows.h"
#include "time.h"

#pragma comment( lib, "visa32" )

#using<system.dll>
using namespace System;
using namespace System::IO;

	bool ident(char* IP)
{

	
	//169.254.109.62


ViSession vi,defaultRM,buf;
double idn;
	// Open session to GPIB device at address 22 
	viOpenDefaultRM(&defaultRM);
	viOpen(defaultRM,IP , 0, 0,&vi) ;
// Initialize device 

viPrintf(vi, "*RST\n");

 viPrintf(vi, "MEAS:RES? (@101)\n", 10,0.000001);

viScanf(vi, "%lf", &idn);
		

	bool a;
	if (idn <0.000001 ) a= false;
	else a = true;

		return a;
}