Measurement-computing Data Acquisition Systems rev.10.4 User Manual Page 51

  • Download
  • Add to my manuals
  • Print
  • Page
    / 366
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 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
Page view 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 365 366

Comments to this Manuals

No comments