12.07.2015 Views

Modelo para trabalhos ABNT - Feevale

Modelo para trabalhos ABNT - Feevale

Modelo para trabalhos ABNT - Feevale

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APÊNDICE B/*Aplicativo <strong>para</strong> ajuste da tensão VDD*/#include #include #include #include #include using namespace std;int main(int argc, char *argv[]){//Declaração de variáveischar valor[5];char buf[256] = {0}, bufonte [50], medida[6];ViSession defaultRM, vif;unsigned long actual;//Define endereço da fontestrcpy(valor, argv[1]);strcpy(bufonte,"GPIB::004::INSTR");bufonte[18]=0;/*Abre sessão GPIB*/viOpenDefaultRM(&defaultRM);viOpen(defaultRM, bufonte, VI_NULL, VI_NULL, &vif);viPrintf(vif, "*IDN?\n");//Desliga a saída da fonteviWrite(vif, (ViBuf)"OUTP OFF", 8, &actual);//Substitui o valor da tensão ajustadastrcpy(bufonte,"APPL P25V,13.42, 1.0");bufonte[10]=valor[0];bufonte[11]=valor[1];bufonte[12]=valor[2];bufonte[13]=valor[3];bufonte[14]=valor[4];bufonte[21]=0;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!