Hi All,
I am having trouble building this script I wrote. I double checked to make sure that the librarys were written into the Visual Studio properties correctly, but everything seemed fine.
#include "stdafx.h"
#include "visa.h"
#include "Windows.h"
void state_One()
{
ViSession rm;
viOpenDefaultRM(&rm);
ViSession v5182_signal_generator;
viOpen(rm, "TCPIP0::10.208.211.33::5025::SOCKET", VI_NULL, VI_NULL, &v5182_signal_generator);
ViSession n9010a_exa_signal_analyzer;
viOpen(rm, "TCPIP0::10.208.211.153::5025::SOCKET", VI_NULL, VI_NULL, &n9010a_exa_signal_analyzer);
printf("You are currently viewing State 01 via v5182 Signal Generator\n");
Sleep(10000);
viPrintf(v5182_signal_generator, "*RCL 1\n");
viPrintf(n9010a_exa_signal_analyzer, ":FREQuency:TUNE:IMMediate\n");
printf(" \n");
printf("You are now viewing W-CDMA Waveform Mode\n");
Sleep(10000);
printf(" \n");
printf("The System Will Now Prepare to Perfrom Measurements\n");
printf(" \n");
Sleep(10000);
printf(" \n");
printf("You are now viewing Channel Power\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:CHPower\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1ChanPow.png'\n");
Sleep(10000);
printf(" \n");
printf("You are now viewing Occupied Bandwith\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:OBWidth\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1OBWidth.png'\n");
Sleep(10000);
printf(" \n");
printf("You are now viewing ACP\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:ACP\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1ACP.png'\n");
Sleep(10000);
printf(" \n");
printf("You are now viewing Power Stat CCDF\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:PSTatistic\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1PowStat.png'\n");
Sleep(10000);
printf(" \n");
printf("You are now viewing Burst Power\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:TXPower\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1BurstPow.png'\n");
Sleep(10000);
printf(" \n");
printf("You are now viewing Spurious Emissions\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:SPURious\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1SPuriousEmis.png'\n");
Sleep(10000);
printf(" \n");
printf("You are now viewing Spectrum Emission Mask\n");
viPrintf(n9010a_exa_signal_analyzer, ":CONFigure:SEMask\n");
viPrintf(n9010a_exa_signal_analyzer, ":MMEMory:STOR:SCR 'S1SpectrumEmissMask.png'\n");
Sleep(10000);
printf(" \n");
printf("The Measurement Tests For State 01 Are Now Complete\n");
Sleep(1000);
printf(" \n");
printf("An Image Of Each Test Has Been Saved to the Desktop\n");
Sleep(1000);
printf(" \n");
printf("Press any key to continue:\n");
getchar();
return;
viClose(n9010a_exa_signal_analyzer);
viClose(v5182_signal_generator);
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}