Agilent Technologies E2094S Guia do Utilizador Página 78

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 146
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 77
78 Agilent VISA User’s Guide
3 Programming with VISA
/* at this time, we can make 'lockkey'
available to other processes that we know
about. This can be done with shared memory or
other inter-process communication methods.
These other processes can then call
"viLock(vi,VI_SHARED_LOCK, 2000, lockkey,
lockkey)" and they will also have access to
this resource. */
/* Initialize device */
viPrintf (vi, "*RST\n");
/* Make sure no other process or thread does
anything to this resource between the
viPrintf() and the viScanf()calls Note: this
also locks out the processes with which we
shared our 'shared lock' key. */
viLock (vi, VI_EXCLUSIVE_LOCK, 2000,
VI_NULL,VI_NULL);
/* Send an *IDN? string to the device */
viPrintf (vi, "*IDN?\n");
/* Read results */
viScanf (vi, "%t", &buf);
/* unlock this session so other processes and
threads can use it */
viUnlock (vi);
/* Print results */
printf ("Instrument identification string:
%s\n", buf);
/* release the shared lock also*/
viUnlock (vi);
/* Close session */
viClose (vi);
viClose (defaultRM);
}
Vista de página 77
1 2 ... 73 74 75 76 77 78 79 80 81 82 83 ... 145 146

Comentários a estes Manuais

Sem comentários