Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I send digital Output at faster rate than 1ms period?

Hi!

I'm using a PCI-6229 to send digital outputs to a power source and I need to send n different numbers in binary code. I need this to be periodic so I've used a while structure and the diferent numbers as the different components of an array. In this way the while loop writes the "task" repetedly at the period I have set to the loop using "wait until next ms multiple". So, it does what I want. The problem is that I need the loop to work at a higher rate than ms. It would be great if I could make it go at 0.01 ms. I have tried and even when the "wait until next ms multiple" doesn't like doubles it tries to work at this rate but the signal is not 100% periodic and I need it to be much more precise.

Does anyone have an idea to solve my problem?

Thanks a lot,

 

Júlia

0 Kudos
Message 1 of 9
(4,973 Views)
You can't use software timing to achieve a higher rate. It is silly to use the wait until next (or the more proper wait ms) on a Windows os. You have hardware timed digital I/O on that device which is capable of much faster and very precise rates.
0 Kudos
Message 2 of 9
(4,968 Views)

Thanks for the answer!

Excuse me, could you please explain me a little bit more the solution you suggest?

I would be very pleased!

0 Kudos
Message 3 of 9
(4,965 Views)
Have you looked at the DAQmx examples? I don't recall the exact names but I would suggest filtering by your hardware. Basically, you create an array of samples that is output by the internal sample clock instead of one sample at a time in a loop. Of you do use a loop, it would be to repeat the entire pattern.
0 Kudos
Message 4 of 9
(4,960 Views)

OK, thanks a lot for the answer. I've been looking at all the examples but I haven't found the precise one. I have been trying to use them but I don't know what do I have to connect , I have no idea about timing... Could anyone help me find an example of high frequency (100kHz) digital output generation? My device is a PCI-6229 controlled through SCB-68.

 

Thanks a lot,

 

Júlia

0 Kudos
Message 5 of 9
(4,889 Views)

I think the example you want to look at is Digital - Continuous Output.vi.  You can just use the onboard clock and set the sample rate to whatever you need (100kHz it looks like).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 9
(4,887 Views)

Ohhhhh!!!! Thanks!

 

That example was exactly what I needed. Now I need to do the same but with to channels... I mean, I need to send two different patterns simultaneously.  What do you recommend? Using 2D U32 in write DAQ.vi or... Labview doesn't like it when I use twice the DaQ timing (sample clock).vi... it says ''The specified resource is reserved. The operation could not be completed as specified.'' What is the best solution?

0 Kudos
Message 7 of 9
(4,774 Views)

You need to create a task that handles both channels.  Then you can use the Multiple Channels, Multiple Samples version of the DAQmx Write.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(4,767 Views)

Thanks to all of you! My project is now working properly!

0 Kudos
Message 9 of 9
(4,713 Views)