hi
im using the pci-mio-16E1 card, with the IDE VC++, so im looking for an example to explicate me how to make an synchronous acquisition data using an external timing, so the idea is to acquire (take) a single data point for each trigger pulse from one input channel ,and saving the data in a file .
now im making a code using the AI_setup and DAQ_op functions, im getting a speed acquisition (it is the start of acquisition data), and it is a synchronous acquisition just for one trigger pulse, and me i looking for an acquisition for each trigger pulse.
so to understand my problem you can see my code :
iStatus = Timeout_Config(iDevice, lTimeout);
iRetVal = NIDAQErrorHandler(iStatus, "Timeout_Config", iIgnoreWarning);
// configuration and selection of signal trigger
iStatus = Configure_HW_Analog_Trigger(iDevice, ND_ON, iLowValue,iHighValue, ND_ABOVE_HIGH_LEVEL, ND_THE_AI_CHANNEL);
iRetVal = NIDAQErrorHandler(iStatus, "Configure_HW_Analog_Trigger", iIgnoreWarning);
iStatus = Select_Signal(iDevice, ND_IN_CONVERT, ND_PFI_2,ND_HIGH_TO_LOW);
iRetVal = NIDAQErrorHandler(iStatus, "Select_Signal", iIgnoreWarning);
iStatus = AI_Setup(iDevice, iChannel, iGain);
iRetVal = NIDAQErrorHandler(iStatus, "AI_Setup", iIgnoreWarning);
while ((iReadingAvail != 1) && (iStatus == 0)) {
/* Wait until reading is available. */
iStatus = AI_Check(iDevice, &iReadingAvail, &iReading);
iRetVal = NIDAQYield(iYieldON);
}
// Acquire data from a single channel
iStatus = DAQ_Op (iDevice, iChannel, iGain, piBuffer, ulCount, dSampRate);
while ((iDAQstopped != 1) && (iStatus == 0)) {
iStatus = DAQ_Check(iDevice, &iDAQstopped, &ulRetrieved);
iRetVal = NIDAQYield(iYieldON);
}
iStatus = DAQ_VScale(iDevice, iChannel, iGain, dGainAdjust, dOffset,ulCount, piBuffer, pdVoltBuffer);
iRetVal = NIDAQErrorHandler(iStatus, "DAQ_VScale",iIgnoreWarning);
/* Set analog trigger mode back to initial state. */
iStatus = Configure_HW_Analog_Trigger(iDevice, ND_OFF, iLowValue,iHighValue, ND_ABOVE_HIGH_LEVEL, ND_THE_AI_CHANNEL);
/* Set PFI line back to initial state. */
iStatus = Select_Signal(iDevice, ND_IN_START_TRIGGER,ND_AUTOMATIC, ND_DONT_CARE);
iStatus = DAQ_Clear(iDevice);
/* Plot acquired data */
iRetVal = NIDAQPlotWaveform(pdVoltBuffer,ulCount, WFM_DATA_F64);
so this is the data acquired -0.900879,-0.900879,-0.900879,-0.900879,-0.900879,-0.900879,-0.900879,-0.900879 and i think that is a noise because all time i get this data.
tank you very mutch fo your help