Agilent Technologies E2094S Manual de servicio Pagina 156

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 218
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 155
156 Agilent Connectivity Guide
6 Programming Your Instruments
CHECK(viWrite(Instrument, SCPIcmd, (ViUInt32)strlen(SCPIcmd),
&actual));
strcpy(SCPIcmd,"*CLS\n"); /* Clear errors and status registers */
CHECK(viWrite(Instrument, SCPIcmd, (ViUInt32)strlen(SCPIcmd),
&actual));
/* Compute waveform */
fprintf(stderr, "Computing Waveform...\n");
strcpy(SCPIcmd, "DATA VOLATILE");
for(i = 1; i <= 5; i++) /* Set rise time (5 points) */
sprintf(SCPIcmd, "%s,%3.1f", SCPIcmd, (double)(i - 1)/5);
for(i = 6; i <= 205; i++)
strcat(SCPIcmd, ",1"); /* Set pulse width (200 points) */
for(i = 206; i <= 210; i++) /* Set fall time (5 points) */
sprintf(SCPIcmd, "%s,%3.1f", SCPIcmd, (double)(210 - i)/5);
for(i = 211; i <= 4000; i++)
strcat(SCPIcmd, ",0"); /* Set remaining points to zero */
strcat(SCPIcmd,"\n");
/* Download data points to volatile memory */
fprintf(stderr,"Downloading Arb...\n");
CHECK(viWrite(Instrument, SCPIcmd, (ViUInt32)strlen(SCPIcmd),
&actual));
fprintf(stderr,"Download Complete\n");
/* Set up arbitrary waveform and output */
strcpy(SCPIcmd,"DATA:COPY PULSE, VOLATILE\n"); /* Copy arb to
non-volatile memory */
CHECK(viWrite(Instrument, SCPIcmd, (ViUInt32)strlen(SCPIcmd),
&actual));
Vista de pagina 155
1 2 ... 151 152 153 154 155 156 157 158 159 160 161 ... 217 218

Comentarios a estos manuales

Sin comentarios