ak123
2008-01-24 18:10:08 UTC
Hi,
I'm currently using c++ to work with the pci 6551. I've satisfactorily managed to generate and acquire data on separate occasions. However now I'm trying to acquire data whilst generating outputs. Is this possible? If so, I require a trigger to initiate the acquisition and fetch, and continue this process until I choose to abort.
Snippets of the code are as follows:
Generation:
checkErr(niHSDIO_InitGenerationSession(deviceID, VI_FALSE, VI_FALSE, VI_NULL, &vi));
checkErr(niHSDIO_AssignDynamicChannels (vi, channelList));
checkErr(niHSDIO_ConfigureSampleClock(vi, NIHSDIO_VAL_ON_BOARD_CLOCK_STR, sampleClockRate));
checkErr(niHSDIO_ConfigureDigitalEdgeScriptTrigger(vi, triggerID, triggerSource, triggerEdge));
checkErr(niHSDIO_ConfigureGenerationMode(vi, NIHSDIO_VAL_SCRIPTED));
checkErr(niHSDIO_WriteNamedWaveformU32(vi, waveformName, WAVEFORM_SIZE, waveformDataU32));
c heckErr(niHSDIO_WriteScript(vi, script));
checkErr(niHSDIO_Initiate(vi));
Acquisiton:
checkErr(niHSDIO_InitAcquisitionSession(aqdeviceID, VI_FALSE, VI_FALSE, VI_NULL, &aqvi));
checkErr(niHSDIO_AssignDynamicChannels (aqvi, channelList));
checkErr(niHSDIO_ConfigureSampleClock(aqvi,NIHSDIO_VAL_STROBE_STR, sampleClockRate));
checkErr(niHSDIO_ConfigureDigitalEdgeStartTrigger(aqvi, triggerTerminal, triggerEdge));
checkErr(niHSDIO_Initiate(aqvi));
Any suggestions? I've tried using multirecord fetch but even that isn't continuous.
I've tried the example multirecord supplied with the card.
Thanks,
Arifa
I'm currently using c++ to work with the pci 6551. I've satisfactorily managed to generate and acquire data on separate occasions. However now I'm trying to acquire data whilst generating outputs. Is this possible? If so, I require a trigger to initiate the acquisition and fetch, and continue this process until I choose to abort.
Snippets of the code are as follows:
Generation:
checkErr(niHSDIO_InitGenerationSession(deviceID, VI_FALSE, VI_FALSE, VI_NULL, &vi));
checkErr(niHSDIO_AssignDynamicChannels (vi, channelList));
checkErr(niHSDIO_ConfigureSampleClock(vi, NIHSDIO_VAL_ON_BOARD_CLOCK_STR, sampleClockRate));
checkErr(niHSDIO_ConfigureDigitalEdgeScriptTrigger(vi, triggerID, triggerSource, triggerEdge));
checkErr(niHSDIO_ConfigureGenerationMode(vi, NIHSDIO_VAL_SCRIPTED));
checkErr(niHSDIO_WriteNamedWaveformU32(vi, waveformName, WAVEFORM_SIZE, waveformDataU32));
c heckErr(niHSDIO_WriteScript(vi, script));
checkErr(niHSDIO_Initiate(vi));
Acquisiton:
checkErr(niHSDIO_InitAcquisitionSession(aqdeviceID, VI_FALSE, VI_FALSE, VI_NULL, &aqvi));
checkErr(niHSDIO_AssignDynamicChannels (aqvi, channelList));
checkErr(niHSDIO_ConfigureSampleClock(aqvi,NIHSDIO_VAL_STROBE_STR, sampleClockRate));
checkErr(niHSDIO_ConfigureDigitalEdgeStartTrigger(aqvi, triggerTerminal, triggerEdge));
checkErr(niHSDIO_Initiate(aqvi));
Any suggestions? I've tried using multirecord fetch but even that isn't continuous.
I've tried the example multirecord supplied with the card.
Thanks,
Arifa