I want to trigger a single pulse on a PCI 6602 from the same trigger that
starts an for a data acquisition on a PCI 6071 E (PFI0 on the 6071)
Here�s part of my code which is not working. PF0 receives the pulse and
starts the DAQ, but the gate on counter 0 on the 6602 never gets a trigger.
I have a RTSI cable installed between both cards. According to the RTSI
cable manual no software has to be installed. Do I need to use RTSI_Conn
();?
BTW, iTimerBoard is the 6602 and iDAQBoard is the 6071.
LVilla
iStatus = GPCTR_Control(iTimerBoard, ulGpctrNum0, ND_RESET); // Reset
0
iRetVal = NIDAQErrorHandler(iStatus,
"GPCTR_Control/RESET",iIgnoreWarning);
iStatus = GPCTR_Set_Application(iTimerBoard,
ulGpctrNum0,ND_SINGLE_TRIG_PULSE_GNR); //Set application to single pulse
iRetVal = NIDAQErrorHandler(iStatus, "GPCTR_Set_Application
0",iIgnoreWarning);
iStatus = GPCTR_Change_Parameter(iTimerBoard, ulGpctrNum0,
ND_SOURCE,ND_INTERNAL_100_KHZ); //Set source signal to 20mhz
internaltimebase
iRetVal = NIDAQErrorHandler(iStatus,"GPCTR_Change_Parameter/SOURCE 0",
iIgnoreWarning);
iStatus = Select_Signal(iDAQBoard, ND_IN_START_TRIGGER, ND_PFI_0,
ND_LOW_TO_HIGH);
iRetVal = NIDAQErrorHandler(iStatus,"send pfi0 to start trigger",
iIgnoreWarning);
Select_Signal (iDAQBoard, ND_RTSI_0, ND_PFI_0, ND_DONT_CARE);
iRetVal = NIDAQErrorHandler(iStatus,"Send PF38 to RTSI 0",
iIgnoreWarning);
// mi default gates is pfi38, reroute RTSI0 instead
iStatus = GPCTR_Change_Parameter(iTimerBoard, ulGpctrNum0, ND_GATE,
ND_RTSI_0);
iRetVal = NIDAQErrorHandler(iStatus,"Select PF38", iIgnoreWarning);
iStatus = GPCTR_Change_Parameter(iTimerBoard, ulGpctrNum0,
ND_COUNT_1,ulLOWcount);
iRetVal = NIDAQErrorHandler(iStatus,"GPCTR_Change_Parameter/COUNT0",
iIgnoreWarning);
iStatus = GPCTR_Change_Parameter(iTimerBoard, ulGpctrNum0,
ND_COUNT_2,ulHIGHcount);
iRetVal = NIDAQErrorHandler(iStatus,"GPCTR_Change_Parameter/COUNT0",
iIgnoreWarning);
/* To output a counter pulse, you must call Select_Signal. */
iStatus = Select_Signal(iTimerBoard, ulGpctrOutput0, ulGpctrOutput0,
ND_LOW_TO_HIGH);
iRetVal = NIDAQErrorHandler(iStatus, "Select_Signal/GpctrOutput0",
iIgnoreWarning);
iStatus = GPCTR_Control(iTimerBoard, ulGpctrNum0, ND_PROGRAM);
iRetVal = NIDAQErrorHandler(iStatus, "GPCTR_Control/PROGRAM 0",
iIgnoreWarning);
setupDAQ(); //configure channels, speed etc
pritf(" Apply your trigger pulse to the GATE of your counter now. The rising
edge will arm and the second falling edge will gate in the value.\n");
/* Loop until 'ulGpctrNum0' is no longer armed. */
etc...