Télécharger Imprimer la page

Agilent Technologies 33250A Guide D'utilisation page 312

Générateur de fonction 80 mhz/ signaux arbitraires

Publicité

//
// Using the Status Registers
//
printf ("Using the Status Registers\n");
IOObj->Output("apply:sin 10e3,1,0");
IOObj->Output("trig:sour bus");
IOObj->Output("burst:ncycles 50000");
IOObj->Output("burst:stat on");
IOObj->Output("*ese 1");
IOObj->Output("*sre 32");
Check_Errors(IOObj);
IOObj->Output("*trg;*opc");
_variant_t Stb;
Stb.vt = VT_I2;
while (1)
{
IOObj->Output("*stb?");
IOObj->Enter(&Stb, "K");
if ((short) Stb & 0x40)
{
}
}
printf ("End of Program\n");
}
catch (_com_error &e)
{
_bstr_t dsp = e.Description();
_bstr_t emsg = e.ErrorMessage();
fprintf (stderr, "COM Exception occurred during
processing!\nDescription::%s\nMessage::%s\n",
}
CoUninitialize();
return 0;
}
6
Chapitre 6 Programmes d'application
Exemple : Microsoft Visual C++ pour Windows
break;
(char *) dsp, (char *) emsg);
312
// 10kHz Sine wave; 1Vpp
// Bus Trigger in Burst
// 50000 cycles x 0.1 = 5s
// Turn ON burst mode
// Operation complete enabled
// Operation complete sets SRQ
// Routine check for errors
// *OPC signals end of *TRG
// Force Enter() to convert to Short
// Request Status Byte
// Read Status Byte
// Test for Master Summary Bit

Publicité

loading