Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Help using RegisterEveryNSamplesEvent ?

I am upgrading Traditional to Legacy, one of the features I am trying to convert is half_Ready which used to tell the Acq Thread that buffer has the samples and ready to be read.... I understand RegisterSamplesEvent will create an event that triggers a function to go read the buffer. But I am having problem making it fit into the flow chart.....Please take a quick look, I have the following;

 

While Thread is ON

 {

     ------- GetDAQData( ...) ;

     ------- etc ........

      int GetDAQData (int *Buffer)

         {

             // Here I used to check flag if Buffer is ready to read using Half_ready

              if(Half-Ready is good)         // How do I replace this concept here ??? - I know half buffers don't exist anymore

                {

                    DAQmxReadBinary16( ...8 chs ...)

                    DAQMxReadCounter ( ... PFI7 ...)

                    DAQmxReadCounter( .... PFI7..)

                    .......//etc

                  }

           }  //end GetDAQData function

   .......

   .......etc

 

} //end Thread

 

So, where do RegisterEveryNSamplesEvent and its function handler will fit in this picture???

 

Thanks

0 Kudos
Message 1 of 3
(6,361 Views)
Any one? Any ideas?
0 Kudos
Message 2 of 3
(6,338 Views)

Hello everyone,

 

This is a duplicate post by the poster of the original question in this thread.  For responses to this forum post please see the original thread.

 

Best wishes,

Wallace F.

National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(6,334 Views)