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.

122viWrite(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*/strcpy(SCPIcmd, "OUTPut ON\n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Chama a função delay, com tempo de 1 segundo*/delay();/*Desabilita a saída*/strcpy(SCPIcmd, "OUTPut OFF\n");viWrite(Instrument, (ViBuf)SCPIcmd, (ViUInt32)strlen(SCPIcmd),&actual);/*Fornece saída*/printf ("\n Fim do teste - %s pulsos",valor);/*Fecha sessão*/viClose(Instrument);viClose(defaultRM);}//final do seta gerador/*Função que gera delay em segundos*/void delay(){clock_t current, end;current = clock();end = current + CLOCKS_PER_SEC * 1.32;while(current < end)current = clock();}

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

Saved successfully!

Ooh no, something went wrong!