Discussion:
How to output/input large buffers with PCI 6534 using Visual C++ -> 5sec delay occured
(too old to reply)
sunuk
2007-12-27 10:40:05 UTC
Permalink
I'm controlling the high speed scanning mirror device with PCI 6534 card.For continous output of data that composed of lager amount of buffers , I used DOsingleBufExtTrig653x.C.For setting number of channel and transfer time, I set the first three configuration buffers like this.
//configuration bufferibuffer[0] = 0x0002;//configuration buffer informing bufferibuffer[1] = 0x003E;//3 channels for output and 3 channels for inputibuffer[2] = 0x0000//interval multiplier(0 means 24 us)
Then, real position data(x,y,z) is filled with sine curve in the same buffer.ibuffer[3] = ibuffer[4] = ..............................................................................................................
And continously output the buffer like below.
while(((Ibuffer*)pParam)->stop_flag == false)    {                  iStatus = Align_DMA_Buffer(iDevice, iResource, ibuffer,            ulCount, ulBufferSize, &ulAlignIndex);        iRetVal = NIDAQErrorHandler(iStatus, "Align_DMA_Buffer",            iIgnoreWarning);        iStatus = DIG_Block_Out(iDevice, iGroup, ibuffer, ulCount);        iRetVal = NIDAQErrorHandler(iStatus, "DIG_Block_Out",            iIgnoreWarning);        printf(" Apply the digital trigger to the 'start trigger' pin to start the operation.\n");        ulRemaining = 1;        while ((ulRemaining != 0) && (iStatus == 0)) {            iStatus = DIG_Block_Check(iDevice, iGroup, &ulRemaining);            iRetVal = NIDAQYield(iYieldON);                       }        iRetVal = NIDAQErrorHandler(iStatus, "DIG_Block_Check",            iIgnoreWarning);               }
When I run this program, there is significant delay (5 sec) beween two consecutive blockout operation.
How can I solve this problem?
I attached my program.


[20071223]ControllerTest1.zip:
http://forums.ni.com/attachments/ni/70/7961/1/[20071223]ControllerTest1.zip
sunuk
2008-01-03 02:40:10 UTC
Permalink
Hello
I tried to test ContGenVoltageWfm_ExtClkDigStart example with PCI-6534 card.
But there is an error message that denotes unsupported channel. The error message is as follows
DAQmx Error: Measurements: Physical channel specified does not exist on this device. Refer to the documentation for channels available on this device.Device: Dev1Physical Channel Name: ao0
Task Name: _unnamedTask<0>
Status Code: -200170End of program, press any key to quit
 
My card does not support analog input/output?
 
And using Cont Write Dig Port-Ext Clk example, I also tried to test.
But DAQmxWriteDigitalU32 function only support unsigned data type such as uInt32.
How can I send sign curve which has the value ranging from +524287 to -524287(signed 20bit)?
And should i fill the data buffer with binary expression instead of integer? 
How about using DAQmxWriteRaw function to send signed int16 data buffer?
sunuk
2008-01-03 02:40:10 UTC
Permalink
Hello
I tried to test ContGenVoltageWfm_ExtClkDigStart example with PCI-6534 card.
But there is an error message that denotes unsupported channel. The error message is as follows
DAQmx Error: Measurements: Physical channel specified does not exist on this device. Refer to the documentation for channels available on this device.Device: Dev1Physical Channel Name: ao0
Task Name: _unnamedTask<0>
Status Code: -200170End of program, press any key to quit
 
My card does not support analog input/output?
 
And using Cont Write Dig Port-Ext Clk example, I also tried to test.
But DAQmxWriteDigitalU32 function only support unsigned data type such as uInt32.
How can I send sign curve which has the value ranging from +524287 to -524287(signed 20bit)?
And should i fill the data buffer with binary expression instead of integer? 
How about using DAQmxWriteRaw function to send signed int16 data buffer?
Loading...