~vbursian/research-assistant/trunk

« back to all changes in this revision

Viewing changes to RAPlugins/NIDAQmxDrivers/NIDAQCounter.cpp

  • Committer: Viktor Bursian
  • Date: 2020-07-16 22:38:41 UTC
  • mfrom: (9.25.2 DIST) (9.16.21 VB)
  • Revision ID: vik@pryanik-20200716223841-0gp0sf6m5imdjtb3
Tags: version_1.5.0
releasing version 1.5.0, closing v.1.4 development

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
  qDebug() << " StartStop Callback Initiated, ErrorCode = " << ErrorCode;
412
412
  Error = Error || !(ErrorCode == 0);
413
413
  ErrorCode = DAQmxSetCITwoEdgeSepFirstTerm (CounterHandle,"StartStopCounter"
414
 
                                            ,ptr_to_const_char(SignalTermName));
 
414
                                            ,ptr_to_const_char(StrobeTermName));
415
415
  qDebug() << " StartStop Counter Set Start Source, ErrorCode = " << ErrorCode;
416
416
  Error = Error || !(ErrorCode == 0);
417
417
  ErrorCode = DAQmxSetCITwoEdgeSepSecondTerm (CounterHandle,"StartStopCounter"
418
 
                                             ,ptr_to_const_char(StrobeTermName));
 
418
                                             ,ptr_to_const_char(SignalTermName));
419
419
  qDebug() << " StartStop Counter Set Stop Source, ErrorCode = " << ErrorCode;
420
420
  Error = Error || !(ErrorCode == 0);
421
421
 
562
562
              DataArray.ArrBody[I] = 0;
563
563
          }
564
564
          for (int I = 0; I < PNumRead; I++){
565
 
               int N = ArraySize - readArray[I];
 
565
               int N = readArray[I];
566
566
               if ((N < ArraySize) && (N >= 0))
567
567
                 DataArray.ArrBody[N] = DataArray.ArrBody[N] + 1.0/TimeStep/StartStopCounts;
568
568
          }