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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

124viWrite(vif, (ViBuf)bufonte, 21, &actual);bufonte[actual] = 0;/*Dá um pulso na saída da fonte*/viWrite(vif, (ViBuf)"OUTP ON", 8, &actual);delay();viWrite(vif, (ViBuf)"OUTP OFF", 8, &actual);/*Finaliza a sessão GPIB*/viClose(vif);viClose(defaultRM);//------------------------------------------------------------------//Envio dos pulsos//------------------------------------------------------------------strcpy(bufonte,"GPIB::010::INSTR");bufonte[18]=0;/*Abre sessão GPIB*/viOpenDefaultRM(&defaultRM);viOpen(defaultRM, bufonte, VI_NULL, VI_NULL, &Instrument);viPrintf(Instrument, "*IDN?\n");/*Seleciona o tipo de onda*/strcpy(SCPIcmd,"FUNC PULS \n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Seleciona a impedância de saída do gerador*/strcpy(SCPIcmd, "OUTPut:LOAD INF\n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Seleciona a amplitude do sinal de saída*/strcpy(SCPIcmd, "VOLTage 10 VPP\n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Seleciona a frequencia do sinal de saída*//*Dado fornecido pelo usuário*/strcpy(SCPIcmd, "FREQuency ");strcat(SCPIcmd, valor);viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Seleciona a largura de pulso*/strcpy(SCPIcmd,"PULS:WIDT 1e-3\n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/* Seleciona a tensão de Off Set*/strcpy(SCPIcmd, "VOLTage:OFFSet 5\n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Habilita a saída*/

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

Saved successfully!

Ooh no, something went wrong!