04-11-2006 03:07 AM
04-11-2006 05:49 PM
Hi Eric,
I am a little unclear on what you are trying to do. Do you want to input/output a certain number of samples repeatedly after a trigger or are you trying to continuously input/output samples? Are you trying to synchronize these operations? Please let me know exactly what you are trying to do and I will help you as best I can.
Regards,
Hal L.
04-11-2006 10:07 PM
hi hal,
thank you for your enthusiasm.i am sorry I had not made my problem clear.
now i am trying to make it clear,i want to use the DAQ PCI6221 to fuction like this,here i give a example.i set the clock period of trigger source 2ms,and i set both output task and input task write/read data 1ms everytime, in the first time,when the trigger clock signal is in the rising,the output task works,but the input task does not work, it does not acquire any data, after 1ms,the output and input start another acquire,while the trigger clock signal is in the falling, the output task does not work,but the input task acquire data,its realization requires detecting trigger state every repeated sampling task.
could you think it can be true?it is a kind of time-sharing,the signal i want to acquire mix with the control signal,so i think if the time-sharing can be true,i could acquire signal having nothing to do with control signal(the signal from output channel,because when i acquire data,the output signal is null).
The problem :when I acquire data continuously,if I could use trigger to judge at every sampling,or I just can use the trigger once.
04-12-2006 05:13 PM
Hi Eric,
I am beginning to get a better understanding of your application. You can have an application that triggers once and the analog input and output tasks run continuously. Also, you can have an application where the analog input tasks will acquire/output a finite number of samples on every trigger. This is called a retriggerable application. I think this is more the direction you are headed.
In order to make an application retriggerable, you will need to use a retriggerable counter output task as well. This way, the counter will be the sample clock for your acquisitions. There is an example for this in the LabVIEW Example Finder under Hardware Input and Output >> DAQmx >> Generate Digital Pulse Train >> Generate Pulse Train - Retriggerable. This way you can set the pulse train to generate a finite number of pulses on every trigger. Also, you might want to check out some simultaneous analog input and analog output examples. Here is the link to an example: NI-DAQmx: Simultaneous AI and AO Using a Shared Clock .
Regards,
Hal L.
04-15-2006 12:06 AM
04-17-2006 09:35 AM
Hi Eric,
Thank you! I'm glad that your application is working now. Hope you have a great week!
Regards,
Hal L.