LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Signal to a PFI output

Solved!
Go to solution

Hello,

 

I use the PCIe-6342 card. I have a sinus signal that I send to 7 digital outputs. Now my problem is that, I need some more digital outputs. So I decided to try the PFI ports on my card. I adressed my 7 digital ouputs to the PFI ports and now I got the following error:

"Selected lines do not support buffered operations.  Ensure only lines that support buffered operations are being used in the task. If using change detection timing, the task must be changed to non-buffered to support these lines. Device: Dev1 Physical Channel: port1/line0"

I read something about in the forum but I didn't understand that, so can somebody help me?

 

Here you can see how I set up my digital outputs.

DAQmxErrChk(DAQmxCreateTask ("", &DigitalOutTaskHandle));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannel_1, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming (DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannel_2, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming(DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannel_3, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming(DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannel_4, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming(DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannel_5, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming(DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannel_6, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming(DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxCreateDOChan (DigitalOutTaskHandle, DigitalChannelZ, "", DAQmx_Val_ChanPerLine));
            DAQmxErrChk(DAQmxCfgSampClkTiming(DigitalOutTaskHandle, "", g_SampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Samples));
            DAQmxErrChk(DAQmxSetWriteAttribute(DigitalOutTaskHandle, DAQmx_Write_RegenMode, DAQmx_Val_DoNotAllowRegen));
            // Allocates memory for the device         

DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(DigitalOutTaskHandle, DAQmx_Val_Transferred_From_Buffer, SAMPLESNB, 0, OnEveryNSamplesEvent_DigitalOut, NULL));
            DAQmxErrChk(DAQmxCfgOutputBuffer(DigitalOutTaskHandle, 15*SAMPLESNB));

 

On this line I get the error:

                    DAQmxErrChk(DAQmxWriteDigitalLines(DigitalOutTaskHandle, (newPointer-g_Pointer), 0, 10.0, DAQmx_Val_GroupByScanNumber, g_TotalPatternDigitalOut, NULL, NULL));

 

I hope somebody can help me?

Best regards

 

 

 

0 Kudos
Message 1 of 3
(2,912 Views)
Solution
Accepted by topic author Fasching_K

Hello Fasching_K,

 

sorry for this. The PFI lines do not support buffered operations. Can you switch to port 0, because this port support this feature. Another option is to work software timed, if this is possible.

 

Page 6 and 7 in the specification

NI 6341 Device Specifications

What Are the Features and Differences of the PFI Lines in X Series, M Series, E Series, and S Series...

best regards
Alexander
0 Kudos
Message 2 of 3
(2,814 Views)

Hello,

thank you for your answer. I switched to port 0 at the end. 🙂

0 Kudos
Message 3 of 3
(2,729 Views)