Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Fixed bytenumbering inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-kretschmerf committed Jan 3, 2017
1 parent bc07af8 commit 1449430
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions NIDAQmxInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ void NIDAQmxInterface::DAQmxSetDO(uInt8 qry_port_bit, bool arm_timer, bool isSet
if (daq->do_port != 0)
{
if(isSet){
daq->do_bit_wrt |= 1 << qry_port_bit;
daq->do_bit_wrt |= 1 << qry_port_bit-1;
}else{
daq->do_bit_wrt &= ~(1 << qry_port_bit);
daq->do_bit_wrt &= ~(1 << qry_port_bit-1);
}
DAQmxErrChk(DAQmxWriteDigitalU8(daq->do_port, 1, 1, 10.0, DAQmx_Val_GroupByChannel, &daq->do_bit_wrt, &written, NULL));
}
Expand All @@ -240,12 +240,12 @@ void NIDAQmxInterface::DAQmxSetDO(uInt8 qry_port_bit, bool arm_timer, bool isSet
/* arm time out if required */
if ((daq->do_clk != 0) & (arm_timer == TRUE))
{

DAQmxErrChk(DAQmxIsTaskDone(daq->do_clk, &done));
daq->do_bit_qry = (done) ? qry_port_bit : (daq->do_bit_qry | qry_port_bit);
DAQmxErrChk(DAQmxStopTask(daq->do_clk));
DAQmxErrChk(DAQmxStartTask(daq->do_clk));
}

/* log trigger */
QString timeString = QTime::currentTime().toString("hh:mm:ss.zzz");
emit(writeToLogFile("TRIGGER", qry_port_bit, (qry_port_bit & daq->do_bit_wrt) == qry_port_bit, timeString));
Expand Down Expand Up @@ -275,6 +275,7 @@ int32 CVICALLBACK NIDAQmxInterface::FcnCbckDetectDI(TaskHandle taskHandle, int32
/* switch OFF box internal resonance generator */
//DAQmxTriggerDO(DAQ_PORT_DO_FREQGEN, FALSE);
DAQmxSetDO(DAQ_PORT_DO_FREQGEN, FALSE, FALSE);
qDebug()<< "switch OFF box internal resonance generator";

}

Expand All @@ -285,6 +286,7 @@ int32 CVICALLBACK NIDAQmxInterface::FcnCbckDetectDI(TaskHandle taskHandle, int32
/* switch ON box internal resonance generator */
//DAQmxTriggerDO(DAQ_PORT_DO_FREQGEN, FALSE);
DAQmxSetDO(DAQ_PORT_DO_FREQGEN, FALSE, TRUE);
qDebug()<< "switch ON box internal resonance generator";
}

/* FRAME condition, line 2 changes from 1 to 0 */
Expand Down

0 comments on commit 1449430

Please sign in to comment.