Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

2 AO with delay

hi,
 
i'm using an M series NI PCI-6259 DAQ card to create multiple AOs and multiple AIs.i have succeeded in creating a program that synchronises the AOs and AIs, writing the aquired data to graph or file if necessary.however, i now need to create a small time delay (~ ms - microseconds) in the generation of the two AOs (they should both still have the same frequency ~ about 100KHz-1MHz and the same amplitudes ~ <10V).is it possible to create such a delay?
 
steve
0 Kudos
Message 1 of 19
(3,797 Views)
Hello Steve,
 
See the attached example, it illustrates how to use the Pause functionality in DAQmx. This may not completely suit your application, but its a good guide to get you started. Basically it set us a Counter Output and pauses the task while the counter is in the low state. This can be configured in many different ways. It uses two AO's and two AIs that you will need to hardwire together to see the results. Alter the physical channel contants appropriately to match your device.
 
Regards,
 
Tom.
NIUK
Message 2 of 19
(3,771 Views)

hi tom,

cheers for the example code, it was very useful.however, i don't need to delay both AOs once the task has started, only one - so that when the task starts, 1 pulse train of digital pulses is generated and then (after some specific time delay) the second digital pulse train is generated.so the two pulse trains still have identical physical attributes (frequency, temporal width, amplitude) but they are offset from eachother by a constant temporal delay (100ns-1ms). i think i will prob need two counters for this, but is it still possible?

thanks again,

steve

0 Kudos
Message 3 of 19
(3,755 Views)
Hello Steve,
 
I better understand your issue now and have written an example for you. You'll need to hard wire your two Counter Outs that you use on your device to two Analouge Input channels to see this working in action. Hope this helps!
 
Remember it only takes a second to rate a good answer 😉
 
Good Luck,
 
Tom.
NIUK
Message 4 of 19
(3,747 Views)

hi tom,

cheers for reply.i'm afraid i don't have version 8.2 labview- could i ask you to send the previous code in version 8 instead?

cheers,

steve

0 Kudos
Message 5 of 19
(3,743 Views)

For LabVIEW 8.0.

Tom.
NIUK

Message 6 of 19
(3,741 Views)
hi tom,
 
cheers for the example code.its definitely been a great help.but there seems to be a bit of a problem after the initial delay.the delay works fine, and the counters themselves produce the current pulse trains.however, after the initial delay, both the counters seem to 'phase-lock' onto eachother again- matching eachother exactly no matter what the initial time delay was.is there any way in which i can introduce this initial delay and preserve it throughout?
 
for example, if the two pulse trains both have high and low periods of 1 second respectively, and you then introduce a time delay of 1 second in one of the pulse trains.so the end result is, the two pulse trains are perfectly out of step with eachother (pulse 1 is high when pulse 2 is low, and vice versa).
 
regards,
 
steve
0 Kudos
Message 7 of 19
(3,733 Views)
is this at all possible?

regards

steve
0 Kudos
Message 8 of 19
(3,714 Views)

still very stuck on this problem

steve

0 Kudos
Message 9 of 19
(3,689 Views)

Hi Steve,

I've run the code posted by Tom and it seems to retain the phase difference as required when run using my M-Series card (a 6221). Have you made any modifications to his example code?

Can you let us know how long it takes for the counters to go back into 'synch' again (you're saying the counters start with a time difference, then lock back into phase with each other somehow). Does the phase difference gradually disappear or 'snap' back instantly? How long do the counters stay out of phase after the start of the pulse train(s)?

If you could post a screenshot or save a batch of the analogue input to a file that may also help us.

Many thanks,

Mark

NI UK & Ireland

0 Kudos
Message 10 of 19
(3,680 Views)