Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Change attributes in DAQmx Sample Clock while running continuously

Hi everyone,
I want to run a program that generates signals on a analog card (PCI-6733) based on an external trigger signal generated by the FPGA PCI-7811R. The trigger signals have very differnt time steps but always the same length. I am using DAQmx drivers.


The data to generate is an array of doubles; each row corresponding to an output. Each trigger should change to the next column. It is important, that the generation restarts immediately at the first column after the last column.
Currently, the best way to do it, is to run the program with "Continous Samples", as it is set at the "Sample Clock" (this way does not require the while loop). The major downside is, that no alteration of the array is possible and that the program is unstoppable. Any changes have to be made by aborting the program via LabVIEW, changing the array and restarting the program. There seems to be no way to change the array while the program is running.


Alternatives I tried are:
1. Using a timeout for the write or wait function greatly increases the risk of "loosing" a trigger and thus having glitches between the analog signal and the digital signals generated by the FPGA. There are very different length of time before the generation of trigger signals starts.
2. Switch the "sample mode" from continous to "finite samples". The major problem here is the way the number of finite samples is handled. If the array has n columns the Sample Clock does not stop until it gets n+1 trigger signals. Because of this, the analog signal generation only works every other run (using the first trigger of the next cycle as n+1). Generating an additional trigger at the end of the array is not a good option, because the program should be able to run continuously AND be able to run just once. The trigger program on the FPGA is complex and speed critical, so that an additional trigger would be hard to implement.
In addition it is again vulnerable to glitches.

The problem breaks down to the attached files. The trigger program is not the real thing, but is hopefully enough for test purposes (or better use an onboard clock and forget about the trigger program). pc-control-web.vi is the important one.
In conclusion, I am looking for a way to change the data (array, number of samples...) while running stable. The time it takes for the update to take effect is not that critical.

Any help would be greatly appreciated
Best regards
Jan

LabVIEW 8.6
Analog Card PCI-6733
FPGA        NI PCI-7811R
Intel Core2QUad Q6700
3 GB Ram
WinXp Sp 3

Message Edited by Freist on 07-31-2009 07:45 AM
0 Kudos
Message 1 of 1
(2,916 Views)