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

Commit

Permalink
Added camera signal P0.3 as input and removed shutter listening
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-kretschmerf committed Feb 3, 2017
1 parent 44e1ac4 commit a465c4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
26 changes: 1 addition & 25 deletions NIDAQmxInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void NIDAQmxInterface::DAQmxInitializeInterface()
/* configure digital read task */
DAQmxErrChk(DAQmxCreateTask("DigIn", &daq->di_port));
DAQmxErrChk(DAQmxCreateDIChan(daq->di_port, "Dev1/port0", "", DAQmx_Val_ChanForAllLines));
DAQmxErrChk(DAQmxCfgChangeDetectionTiming(daq->di_port, "Dev1/port0/line2,Dev1/port0/line6", "Dev1/port0/line2,Dev1/port0/line6", DAQmx_Val_ContSamps, 1));
DAQmxErrChk(DAQmxCfgChangeDetectionTiming(daq->di_port, "Dev1/port0/line2,Dev1/port0/line3,Dev1/port0/line6", "Dev1/port0/line2,Dev1/port0/line3,Dev1/port0/line6", DAQmx_Val_ContSamps, 1));
DAQmxErrChk(DAQmxRegisterSignalEvent(daq->di_port, DAQmx_Val_ChangeDetectionEvent, 0, ChangeDetectionCallbackWrapper, this));

/* configure digital write task */
Expand Down Expand Up @@ -265,30 +265,6 @@ int32 CVICALLBACK NIDAQmxInterface::FcnCbckDetectDI(TaskHandle taskHandle, int32
if (read)
{

/* SHUTTER ON condition, SHUTTER line changes from 0 to 1 */
if (((daq->di_bit_prev & DAQ_PORT_DI_SHUTTER) == DAQ_PORT_NULL) &
((daq->di_bit_now & DAQ_PORT_DI_SHUTTER) == DAQ_PORT_DI_SHUTTER))
{
daq->di_cntr_imaq++;
daq->di_cntr_frame = 0;

/* 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";

}

/* SHUTTER OFF condition, SHUTTER line changes from 1 to 0 */
if (((daq->di_bit_prev & DAQ_PORT_DI_SHUTTER) == DAQ_PORT_DI_SHUTTER) &
((daq->di_bit_now & DAQ_PORT_DI_SHUTTER) == DAQ_PORT_NULL))
{
/* 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 */
if (((daq->di_bit_prev & DAQ_PORT_DI_FRAME) == DAQ_PORT_DI_FRAME) & ((daq->di_bit_now & DAQ_PORT_DI_FRAME) == DAQ_PORT_NULL))
{
Expand Down
3 changes: 1 addition & 2 deletions NIDAQmxInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class NIDAQmxInterface: public QObject
static const int DAQ_PORT_DI_SHUTTER = 0x01;
static const int DAQ_PORT_DI_BACKLIGHT = 0x02;
static const int DAQ_PORT_DI_FRAME = 0x04;

static const int DAQ_PORT_DI_CAMERATRIGGER = 0x8;
static const int DAQ_PORT_DI_CAMERATRIGGER = 0x08;

// static const int DAQ_PORT_DI_AIR = 0x08;
// static const int DAQ_PORT_DI_WATER = 0x10;
Expand Down

0 comments on commit a465c4c

Please sign in to comment.