01-24-2008 11:42 AM
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));
checkErr(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
01-30-2008 04:58 AM
01-30-2008 10:16 AM
Hi Tom,
Sorry for the late reply, couldn't remember which category I posted the question. Thanks for that suggestion. I was using the example that you suggested however I required a retriggerable acquisition which I solved by putting the initiate function in a continuous for loop. But I've moved from that topic but still got a slight problem, it's with tristating and WDT. I posted a separate message,not sure if you are familiar with WDT but the post was as follows:
01-31-2008 09:39 AM
02-01-2008 06:53 AM
Hi Kabul,
I figured out what the problem was, i varied the waveform size and wdt and i assume i got the proportion right and the data is as expected. When I said as expected, I was chucking out predetermined data, therefore when i monitored the data lines it wasn't what i put in. for example if i passed values 0-7 to lines 0-2, i should see the equivalent as a waveform on the scope. The values I used are:
WAVEFORM_SIZE 599999
WDT_SIZE 100000However there seems to be a triggering issue, which I would like some advice on. Using the above waveform size, and the onboard clock at 50 MHz,if I trigger the card at 400Hz, I see the data at every rising trigger edge as expected. However if i increase triggering to a few KHz, the data is being chucked out at all random times. After experimenting a bit I reduced the waveform size when using the writenamewaveform function to about 2 and the output data seems exact at every rising edge when triggering at few KHz. Therefore my question is, what delays are involved to cause this? And is there anyway I can go abouts resolving it? Have had a look at DirectDMA, but don't know if that would solve anything and how would I implement it in my program?
Thanks,
Arifa