Rigol DS1000D Manual do Utilizador Página 108

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 137
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 107
RIGOL
Programming Guide for DS1000E, DS1000D Series
3-4
5. Add the codes.
Enter the programming environment. First of all, declare “void
SendToUSB(CString cmd)” and “unsigned char* Read_USB( void )in header file,
then add the following codes:
//send setting command
void SendToUSB(CString cmd)
{
int temp,j;
CString cmdstr;
cmdstr = cmd;
unsigned char * strInput;
//recall the GetTMCDeviceNum and WriteUSB function from
RigolTMCUsb_UI.dll
HMODULE module = LoadLibrary("RigolTMCUsb_UI.dll");
typedef bool (CALLBACK* pWrite)(unsigned long, unsigned char,unsigned
char,unsigned long,unsigned char*);
typedef int (CALLBACK* pGetDeviceNum)();
temp = cmdstr.GetLength();
strInput = (unsigned char*)cmdstr.GetBuffer(10);
if(module)
{
pGetDeviceNum GetDevice =
(pGetDeviceNum)GetProcAddress(module,"GetTMCDeviceNum");
pWrite Write = (pWrite)GetProcAddress(module,"WriteUSB");
j = GetDevice();
if( j > 0 )
{
//send a command to the oscilloscope
//the definition of interface has been mentioned in “Rigolusb.h”
Vista de página 107
1 2 ... 103 104 105 106 107 108 109 110 111 112 113 ... 136 137

Comentários a estes Manuais

Sem comentários