Skip to content

Commit b3dbaed

Browse files
committed
Disable setting channel 0 output (gate to channels 2-8) MCS mode.
This is needed now that we changed the gate settings to allow external gating.
1 parent 0db3606 commit b3dbaed

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

measCompApp/src/drvUSBCTR.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,22 @@ int USBCTR::startMCS()
560560
}
561561
}
562562

563+
// Disable presets on channel 0.
564+
// These will have been set in scaler mode, and will stop channels 2-8 after the
565+
// most recent preset count time if not set to 0 here.
566+
#ifdef _WIN32
567+
status = cbCLoad32(boardNum_, OUTPUTVAL0REG0, 0);
568+
status = cbCLoad32(boardNum_, OUTPUTVAL1REG0, 0);
569+
#else
570+
status = ulCLoad(daqDeviceHandle_, 0, CRT_OUTPUT_VAL0, 0);
571+
status = ulCLoad(daqDeviceHandle_, 0, CRT_OUTPUT_VAL1, 0);
572+
#endif
573+
if (status) {
574+
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
575+
"%s::%s error calling cbCLoad32, reg=OUTPUTVALREG, value=%d, status=%d, error=%s\n",
576+
driverName, functionName, 0, status, getErrorMessage(status));
577+
}
578+
563579
if ((channelAdvance == mcaChannelAdvance_External) && (prescale > 1) ) {
564580
#ifdef _WIN32
565581
// LOADREG0=0, LOADREG1=1, so we use addr

0 commit comments

Comments
 (0)