From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

6733 continuous signal output generation.

Solved!
Go to solution

Hi,

 

I want to use a NI PCI 6733 card for continuous signal output generation.

I downloaded  the NI Measurement Hardaware DDK NI 671x & 673x (PCI & PXI) examples and run some examples.

 

Our goal is to put some samples in the FIFO buffer and use the external update trigger (on PFI5) to send the samples to the output.

Basically a combination of example AOEX4.cpp and AOEX6.cpp should work.

 

However, example 6 uses board->DACDirectData0.writeRegister(..) to set an output value.

To update the output I use the following code to generate a block wave.

 

void
NIPCI6733Card::OnPoll_Test_T6() // function called at 5 kHz
{
t67xx* const board = &GetNI();
tSTC* const theSTC = &GetSTC();

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
theSTC->Joint_Reset.writeAO_Configuration_Start(1);
theSTC->Joint_Reset.setAO_Configuration_Start(0);
theSTC->Joint_Reset.setAO_Configuration_End(1);
theSTC->Joint_Reset.flush();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

board->DACDirectData0.writeRegister((OutputHigh)?0x0400:0x0);
board->DACDirectData1.writeRegister((OutputHigh)?0x0400:0x0);
board->DACDirectData3.writeRegister((OutputHigh)?0x0100:0x0);

OutputHigh = !OutputHigh;

}

 

My application (On Poll) update frequency is 5 kHz. The output should run on 15 meaning every update I have to set 3 samples ahead. I want to use the FiFo for that.

(Note: The output is triggerd by PFI5 at 15 kHz)

My idea is to set 3 samples in the FiFo buffer every application update and let the external trigger update the output.

Example 4 uses the FiFo. However, this example stops after 5 runs running the same fifo data.

 

How can I set continuous FiFo data?

 

Manual 370735e.pdf describes the following:

 

With non-regeneration, old data will not be repeated. New data must be
continually written to the buffer. If the program does not write new data to
the buffer at a fast enough rate to keep up with the generation, the buffer
will underflow and cause an error.

 

This is what I want. Is there an example available?

 

Regards,

 

Peter

 

 

 

 

0 Kudos
Message 1 of 3
(4,876 Views)
Since you are using the DDK and not the standard driver, you should post to the correct board - http://forums.ni.com/t5/Driver-Development-Kit-DDK/bd-p/90

Curious why you are creating your own driver when at first glance, it seems the standard driver would work.
0 Kudos
Message 2 of 3
(4,847 Views)
Solution
Accepted by topic author Piep

Dennis,

 

Thanks for your reply.

I whil post It on the correct board.

I'm implementing this for IN-Time. This is a realtime OS for Windows. 

 

Regards,

 

Peter

0 Kudos
Message 3 of 3
(4,843 Views)