Skip to content

Commit

Permalink
Merge pull request #490 from micro-manager/NIDAQ_Bug_Fix
Browse files Browse the repository at this point in the history
NIDAQ: Work around bug with 6341 card that lies about its portWidth.
  • Loading branch information
nicost authored Sep 10, 2024
2 parents 3db33f6 + 18b71a7 commit 31d33da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DeviceAdapters/NIDAQ/NIDigitalOutputPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ int DigitalOutputPort::Initialize()
supportsBlankingAndSequencing_ = true;
GetHub()->StopDOBlankingAndSequence(portWidth_);

// Some cards lie about their portwidth, if blanking does not work, try 32 bits
if (!supportsBlankingAndSequencing_)
{
uInt32 oldPortWidth = portWidth_;
portWidth_ = 32;
if (GetHub()->StartDOBlankingAndOrSequence(tmpNiPort, portWidth_, true, false, 0, false, tmpTriggerTerminal) == DEVICE_OK)
supportsBlankingAndSequencing_ = true;
GetHub()->StopDOBlankingAndSequence(portWidth_);
}

CPropertyAction* pAct;
if (supportsBlankingAndSequencing_)
{
Expand Down

0 comments on commit 31d33da

Please sign in to comment.