Measurement-computing Data Acquisition Systems rev.10.4 Manual do Utilizador Página 51

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 366
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 50
Reading/Interpreting Mask and Flag Values
Reading and interpretting mask and flag parameters returned by the DaqX driver can be a bit trickier. What is
needed here is to logically “and” the flags that are of interest with the flags returned from the DaqX API.
Those flag bits which are set (bit value =1 )
C/C++
Flags = Flag1 + Flag2 + Flag3 + … Flagn; // C language format
If ((Flags & returnedFlags) == Flags) ; // C language format
{
// Code for flagsSet condition
} else {
// Code for flags NOT set condition
}
// C Language Example
acqFlags = DaafTriggered + DaafAcqActive; // C language
example
if ((acqFlags & acqReturned) == acqFlags) {
{
printf(“Acquisition has been triggered and post-trigger data is being acquired\n”);
} else {
if (acqReturned & DaafAcqActive) {
printf(“ Acquistion is active but has not been triggered\n”);
} else {
printf(“Acquisition is not active\n”);
}
}
Visual Basic
Value = Flag1 + Flag2 + Flag3 + … Flagn ‘ Visual Basic format
channel Flags& = DafAnalog& + DafBipolar& + DafUnsigned& ‘ Visual Basic
example
Programmer’s Manual 938395 Daq API Command Reference 4.1-7
Vista de página 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 365 366

Comentários a estes Manuais

Sem comentários