Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

time-sharing with DAQ,could the trigger be used manytimes when procedures is working.

Hello everyone:
i want to do a data acquire VI,the hardware i used is PCI 6221,i use its analog output  and analog input.
this VI have the function:when it  outputs data,the input channel do not work,while when it inputs data,the output channel do not work,i want to use trigger VI to accomplish it.
i give the read VI and write VI the same trigger source,but one is triggered when the rising of digital edge,the other is triggered when the falling of digital edge,this time,input channel works,next time,output channel works.i want to use a while loop to accomplish it ,make the samples time onetime the same as the half of the period of trigger pulse,here i face a big problem,that is the trigger just work one time,when the trigger functions one time,the input task and output task will act by themselves.
now i am making an kind of actuator,it can detect its own output(force or displacement)without any external sensor,it is very annoying to extract the sensor signal from control signal,so i want to make use of time-sharing to accomplish it.
could you give me some advices?do you think it could come true?
give my best regards to you!
0 Kudos
Message 1 of 6
(3,269 Views)

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.

0 Kudos
Message 2 of 6
(3,257 Views)

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.

0 Kudos
Message 3 of 6
(3,248 Views)

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.

0 Kudos
Message 4 of 6
(3,240 Views)
Hi Hal:
   Thank you for your help,through your instructions,i have done it.
   today is saturday,hope you have a good weekend.
  give my best regards to you and your family.
 
 
 Eric
0 Kudos
Message 5 of 6
(3,216 Views)

Hi Eric,

Thank you! I'm glad that your application is working now. Hope you have a great week!

Regards,

Hal L.

0 Kudos
Message 6 of 6
(3,192 Views)