Click here to Skip to main content
16,011,508 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.

C++
// FinalTestMode.cpp 

#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;
}
Posted
Updated 12-Jul-12 5:20am
v2
Comments
[no name] 12-Jul-12 11:08am    
I do not think that posting code is going to help with this. This seems more likely to be a setup issue and not a code issue. What library does it say that it cannot open?

In the linker properties the library was incorrectly added!
 
Share this answer
 
Firsly it is not possible to guess what your problem is. If reported then a problem does exist.

Check all in this link.

http://msdn.microsoft.com/en-us/library/ts7eyw4s.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900