Measurement-computing Data Acquisition Systems rev.10.4 Uživatelský manuál Strana 51

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 366
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 365 366

Komentáře k této Příručce

Žádné komentáře