Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

6280 output data with spefied frequency

Solved!
Go to solution

Hello!

 

I am using the PXIe 6280, I need to send 16 bits data to the digital outputs from the host PC using labview.

The problem is that i cannot control the timming of these data at the output ports. the data are digital data so I need to send the data at each T

where T=1/f and f is the speficed frequency that I can put it to acheive a specifc frequency.

 

I send data 16 bits word but the timming is limited to the rate of the loop in labview and to other factors like the lantecy in the bus...

so i cannot acheive a maximum frequency ..

 

Thank,

Ye Nass

0 Kudos
Message 1 of 12
(3,858 Views)
Solution
Accepted by topic author yenaslab

Your M-series board *can* do precision-timed digital output based on a hardware clock.  However, it cannot generate that sample clock for itself.  It needs to borrow one from elsewhere.   This is what M-series boards call "correlated DIO".

 

Often, this clock is borrowed from another on-board task such as a counter pulse train output or an analog task.  Here's one example.

 

Note that only digital port 0 will support hardware-timed output.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 12
(3,853 Views)

Thanks Kevin,

 

In this case i need to use external clock reference? or what will be the solution if I do not have external clock to feed in the system?

and if i have to wich pin i want to connect the clock?

 

Many thanks,

Ye nass

 

0 Kudos
Message 3 of 12
(3,825 Views)

The clock you'll need can come from the 6280, but you'll need to generate it with another task such as a counter pulse train output or a clocked analog task.  The link I put in my previous msg illustrates a way to do it by borrowing a clock signal from an analog output task.

 

Your board offers many flexible options for routing timing signals so there isn't a single dedicated pin to wire to.  In fact, DAQmx allows you to route many signals internally so there's often no need to do any physical wiring to any pin at all.

 

In the linked example, the AO task is queried to get the logical terminal name of its sample clock signal, and then that's fed into the DO task where it can be "borrowed" for use as a DO sample clock.

 

A different way to make the same query is with a DAQmx Timing property node, selecting the property Sample Clock-->Terminal.

sample clock terminal.png

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 12
(3,796 Views)

Hi,

I have follow your example but I get the Error 89125 when I replace the SimDev1/port0/ by the PXI1Slot4/port0 : the physical line to export the signal on a external board ? Do you have a clue to resolve this issue ?

Download All
0 Kudos
Message 5 of 12
(3,784 Views)

Try changing the AO task to a continuous AI task on the same 6280 board.   Inside the loop, you'll need to read data from the AI task every iteration to prevent an error.  You (probably) don't have to send the data anywhere, you just need place the call to DAQmx Read, preferably with '# samples to read' set to -1, which means, "read all available samples, whatever # there are".    I'd add a little delay timer in the loop too, somewhere in the 50-200 msec range maybe.  That'll still feel responsive to a user clicking "stop" but won't burn CPU iterating at a super high rate.

    Note that you'll need to reduce your sample rate down quite a bit to something the board supports, like maybe 500 kHz.

 

Two likely problems leading to your error:

1. The AO task is specified to run on an apparently simulated device.  Hence no way to route an *actual* sample clock signal over to your *actual* device.

2. Your 6280 device doesn't seem to have any AO capability.  That's why I'm now suggesting the use of an AI task to supply the sample clock.

 

If you truly need a higher DO sample rate than the AI clock can provide, you'll need to substitute a counter task with a continuous pulse train for the AI task.   It will support the max 10 MHz rate that the DO can handle.  You'd then need to use a DAQmx Channel property node to query for the pulse output terminal that you can feed to your DO task.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 6 of 12
(3,776 Views)

Hello Kevin:

 

I Really want ot thank you four help. We face a lot of problems to send data at the port0 of the PXI6280.

 

The application is about send data with specific and deterministic frequency at the digital output like the digital output port of the PXI6280.

 

For this purpose I do not know why we need for the AI task? What we need is excately what you had said

 

"If you truly need a higher DO sample rate than the AI clock can provide, you'll need to substitute a counter task with a continuous pulse train for the AI task.   It will support the max 10 MHz rate that the DO can handle"

 

So we need to send data to the I/O of the 6280, our data are stored in a file that labview reads the file and then send the 8 bit word to port0 so the main goal is to send 8bit word each clock cycle or each T where T=1/f where f it is changable up to 10 MHz supported by the port0.

 

Many Thanks,

Yenass

0 Kudos
Message 7 of 12
(3,760 Views)
Solution
Accepted by topic author yenaslab

The AI task was there solely to make up for a limitation of the DO subsystem of the 6280 device (and other M-series multifunction boards).  The limitation is that the DO subsystem cannot derive its own sample clock, it needs one to be supplied from "elsewhere".

 

Meanwhile, AI, AO, and CTR tasks on the same board *are* able to derive their own timing and share it with the DO subsystem.  So the AI task was there *only* because it could make its own sample clock and then share it with DO.

 

Attached is a small mod I did to that example so that the DO sampling is driven by a CTR pulsetrain.   To run the example successfully at higher sample rates, you'll need to define a much larger array of DO samples.   I was able to run without error here on a desktop 6341 board, though I needed to write a much bigger array of DO samples when I raised the rate to 1 MHz (the max for my board's DO subsystem).

 

 

-Kevin P

 

M_Series_CDO_with_CTR_Sample_Clock.png

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 8 of 12
(3,752 Views)

Hello Kevin:

 

The design you sent is working on the PXI6280 but with limited frequency. we can acheive up to 250Khz not the 10MHz or even the 1Mhz.

 

It is ok if it is the board of the PXie6280 is limited to this frequency. meanwhile I saw the story of the 8 bit hardware timmed output limited to 10Mhz.

 

Another thing if we need to include with the same design you sent a data aquisition blocks that aquire from analog inputs voltage with the same frequency as the digital outputs is it possible?

 

Thanks,

Yenass

0 Kudos
Message 9 of 12
(3,738 Views)

Hello 

I post the VI of the project for the moment, it doesn't work properly at high frequency, but it's close to what we want.

0 Kudos
Message 10 of 12
(3,732 Views)